From 54b738dea4edf357cd8aba79e383e4f41ec4a276 Mon Sep 17 00:00:00 2001 From: xuhuisheng Date: Sat, 29 Nov 2025 09:10:03 +0800 Subject: [PATCH] Fix signal too early causing theme warning --- editor/run/game_view_plugin.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/editor/run/game_view_plugin.cpp b/editor/run/game_view_plugin.cpp index 5361dbdd1d3..4da0bcca4d5 100644 --- a/editor/run/game_view_plugin.cpp +++ b/editor/run/game_view_plugin.cpp @@ -1244,9 +1244,12 @@ GameView::GameView(Ref p_debugger, EmbeddedProcessBase *p_embe selection_hb->add_child(hide_selection); hide_selection->set_toggle_mode(true); hide_selection->set_theme_type_variation(SceneStringName(FlatButton)); - hide_selection->connect(SceneStringName(toggled), callable_mp(this, &GameView::_hide_selection_toggled)); hide_selection->set_tooltip_text(TTRC("Toggle Selection Visibility")); hide_selection->set_pressed(EditorSettings::get_singleton()->get_project_metadata("game_view", "hide_selection", false)); + if (hide_selection->is_pressed()) { + debugger->set_selection_visible(false); + } + hide_selection->connect(SceneStringName(toggled), callable_mp(this, &GameView::_hide_selection_toggled)); selection_hb->add_child(memnew(VSeparator));