summaryrefslogtreecommitdiffstats
path: root/editor/editor_node.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-05-29 22:13:45 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-05-29 22:13:45 +0200
commitc42751cae2ae93bea31a7b0df994d7fafbe834f0 (patch)
treedf032aa9d4cd7cc67c2bb0b7f09d56e898d478b8 /editor/editor_node.cpp
parentd489d4aa24e5257dada7a769caa6df5318a38453 (diff)
parent76205d4276f61b49b793a6df4b03c5f7eddd88c3 (diff)
downloadredot-engine-c42751cae2ae93bea31a7b0df994d7fafbe834f0.tar.gz
Merge pull request #91033 from Hilderin/keep_current_bottom_panel_on_play
Add editor setting to keep bottom panel state on play and stop game
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r--editor/editor_node.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 964061505f..0df4df36bc 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -4543,17 +4543,19 @@ void EditorNode::_project_run_started() {
log->clear();
}
- if (bool(EDITOR_GET("run/output/always_open_output_on_play"))) {
+ int action_on_play = EDITOR_GET("run/bottom_panel/action_on_play");
+ if (action_on_play == ACTION_ON_PLAY_OPEN_OUTPUT) {
bottom_panel->make_item_visible(log);
+ } else if (action_on_play == ACTION_ON_PLAY_OPEN_DEBUGGER) {
+ bottom_panel->make_item_visible(EditorDebuggerNode::get_singleton());
}
}
void EditorNode::_project_run_stopped() {
- if (!bool(EDITOR_GET("run/output/always_close_output_on_stop"))) {
- return;
+ int action_on_stop = EDITOR_GET("run/bottom_panel/action_on_stop");
+ if (action_on_stop == ACTION_ON_STOP_CLOSE_BUTTOM_PANEL) {
+ bottom_panel->hide_bottom_panel();
}
-
- bottom_panel->make_item_visible(log, false);
}
void EditorNode::notify_all_debug_sessions_exited() {