Merge pull request #111755 from xuhuisheng/dev/signal_too_early

Game View Plugin: Fix signal connected too early causing theme warning
This commit is contained in:
Rémi Verschelde 2025-12-01 11:48:20 +01:00
commit c2ee46011f
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -1244,9 +1244,12 @@ GameView::GameView(Ref<GameViewDebugger> 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));