diff options
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r-- | editor/editor_node.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 28768b7f34..6bc281c7e4 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -4878,7 +4878,7 @@ void EditorNode::_load_docks() { editor_data.set_plugin_window_layout(config); } -void EditorNode::_update_dock_slots_visibility() { +void EditorNode::_update_dock_slots_visibility(bool p_keep_selected_tabs) { if (!docks_visible) { for (int i = 0; i < DOCK_SLOT_MAX; i++) { dock_slot[i]->hide(); @@ -4913,9 +4913,11 @@ void EditorNode::_update_dock_slots_visibility() { } } - for (int i = 0; i < DOCK_SLOT_MAX; i++) { - if (dock_slot[i]->is_visible() && dock_slot[i]->get_tab_count()) { - dock_slot[i]->set_current_tab(0); + if (!p_keep_selected_tabs) { + for (int i = 0; i < DOCK_SLOT_MAX; i++) { + if (dock_slot[i]->is_visible() && dock_slot[i]->get_tab_count()) { + dock_slot[i]->set_current_tab(0); + } } } @@ -5528,7 +5530,7 @@ void EditorNode::_bottom_panel_switch(bool p_enable, int p_idx) { void EditorNode::set_docks_visible(bool p_show) { docks_visible = p_show; - _update_dock_slots_visibility(); + _update_dock_slots_visibility(true); } bool EditorNode::get_docks_visible() const { @@ -6957,6 +6959,8 @@ EditorNode::EditorNode() { play_custom_scene_button->connect("pressed", callable_mp(this, &EditorNode::_menu_option).bind(RUN_PLAY_CUSTOM_SCENE)); play_custom_scene_button->set_tooltip_text(TTR("Run a specific scene.")); + _reset_play_buttons(); + ED_SHORTCUT_AND_COMMAND("editor/run_specific_scene", TTR("Run Specific Scene"), KeyModifierMask::META | KeyModifierMask::SHIFT | Key::F5); ED_SHORTCUT_OVERRIDE("editor/run_specific_scene", "macos", KeyModifierMask::META | KeyModifierMask::SHIFT | Key::R); play_custom_scene_button->set_shortcut(ED_GET_SHORTCUT("editor/run_specific_scene")); |