summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-03 12:17:39 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-03 12:17:39 +0100
commitec3c01cd64ada0dbac28666342f6f954b7c84b2d (patch)
tree2a7de83ec9bbf6e568ea4138790eb58bb3b53096
parent81f0ddeae07b2e4ed8fda51bf87df52d58820c13 (diff)
parentdef4087a4018a0e96940c8498d47042443f3eb90 (diff)
Merge pull request #70554 from stmSi/suggest-filename-save-branch-remote-tree
[4.0] Suggest Filename in Remote Tree File Dialog
-rw-r--r--editor/debugger/editor_debugger_tree.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/editor/debugger/editor_debugger_tree.cpp b/editor/debugger/editor_debugger_tree.cpp
index 8b31781c5e..351af4508f 100644
--- a/editor/debugger/editor_debugger_tree.cpp
+++ b/editor/debugger/editor_debugger_tree.cpp
@@ -118,6 +118,7 @@ void EditorDebuggerTree::_scene_tree_rmb_selected(const Vector2 &p_position, Mou
item_menu->add_icon_item(get_theme_icon(SNAME("CreateNewSceneFrom"), SNAME("EditorIcons")), TTR("Save Branch as Scene"), ITEM_MENU_SAVE_REMOTE_NODE);
item_menu->add_icon_item(get_theme_icon(SNAME("CopyNodePath"), SNAME("EditorIcons")), TTR("Copy Node Path"), ITEM_MENU_COPY_NODE_PATH);
item_menu->set_position(get_screen_position() + get_local_mouse_position());
+ item_menu->reset_size();
item_menu->popup();
}
@@ -323,6 +324,8 @@ void EditorDebuggerTree::_item_menu_id_pressed(int p_option) {
file_dialog->add_filter("*." + extensions[i], extensions[i].to_upper());
}
+ String filename = get_selected_path().get_file() + "." + extensions.front()->get().to_lower();
+ file_dialog->set_current_path(filename);
file_dialog->popup_file_dialog();
} break;
case ITEM_MENU_COPY_NODE_PATH: {