Skip to content

Commit 52889ab

Browse files
committed
[Scene] Add SceneStringName::toggled
1 parent f648de1 commit 52889ab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+74
-72
lines changed

editor/action_map_editor.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ ActionMapEditor::ActionMapEditor() {
584584

585585
show_builtin_actions_checkbutton = memnew(CheckButton);
586586
show_builtin_actions_checkbutton->set_text(TTR("Show Built-in Actions"));
587-
show_builtin_actions_checkbutton->connect("toggled", callable_mp(this, &ActionMapEditor::set_show_builtin_actions));
587+
show_builtin_actions_checkbutton->connect(SceneStringName(toggled), callable_mp(this, &ActionMapEditor::set_show_builtin_actions));
588588
add_hbox->add_child(show_builtin_actions_checkbutton);
589589

590590
show_builtin_actions = EditorSettings::get_singleton()->get_project_metadata("project_settings", "show_builtin_actions", false);

editor/code_editor.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -755,13 +755,13 @@ FindReplaceBar::FindReplaceBar() {
755755
hbc_option_search->add_child(case_sensitive);
756756
case_sensitive->set_text(TTR("Match Case"));
757757
case_sensitive->set_focus_mode(FOCUS_NONE);
758-
case_sensitive->connect("toggled", callable_mp(this, &FindReplaceBar::_search_options_changed));
758+
case_sensitive->connect(SceneStringName(toggled), callable_mp(this, &FindReplaceBar::_search_options_changed));
759759

760760
whole_words = memnew(CheckBox);
761761
hbc_option_search->add_child(whole_words);
762762
whole_words->set_text(TTR("Whole Words"));
763763
whole_words->set_focus_mode(FOCUS_NONE);
764-
whole_words->connect("toggled", callable_mp(this, &FindReplaceBar::_search_options_changed));
764+
whole_words->connect(SceneStringName(toggled), callable_mp(this, &FindReplaceBar::_search_options_changed));
765765

766766
// Replace toolbar
767767
replace_text = memnew(LineEdit);
@@ -786,7 +786,7 @@ FindReplaceBar::FindReplaceBar() {
786786
hbc_option_replace->add_child(selection_only);
787787
selection_only->set_text(TTR("Selection Only"));
788788
selection_only->set_focus_mode(FOCUS_NONE);
789-
selection_only->connect("toggled", callable_mp(this, &FindReplaceBar::_search_options_changed));
789+
selection_only->connect(SceneStringName(toggled), callable_mp(this, &FindReplaceBar::_search_options_changed));
790790

791791
hide_button = memnew(TextureButton);
792792
add_child(hide_button);

editor/editor_asset_installer.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ EditorAssetInstaller::EditorAssetInstaller() {
685685
show_source_files_button->set_toggle_mode(true);
686686
show_source_files_button->set_tooltip_text(TTR("Open the list of the asset contents and select which files to install."));
687687
remapping_tools->add_child(show_source_files_button);
688-
show_source_files_button->connect("toggled", callable_mp(this, &EditorAssetInstaller::_toggle_source_tree).bind(false));
688+
show_source_files_button->connect(SceneStringName(toggled), callable_mp(this, &EditorAssetInstaller::_toggle_source_tree).bind(false));
689689

690690
Button *target_dir_button = memnew(Button);
691691
target_dir_button->set_text(TTR("Change Install Folder"));
@@ -698,7 +698,7 @@ EditorAssetInstaller::EditorAssetInstaller() {
698698
skip_toplevel_check = memnew(CheckBox);
699699
skip_toplevel_check->set_text(TTR("Ignore asset root"));
700700
skip_toplevel_check->set_tooltip_text(TTR("Ignore the root directory when extracting files."));
701-
skip_toplevel_check->connect("toggled", callable_mp(this, &EditorAssetInstaller::_set_skip_toplevel));
701+
skip_toplevel_check->connect(SceneStringName(toggled), callable_mp(this, &EditorAssetInstaller::_set_skip_toplevel));
702702
remapping_tools->add_child(skip_toplevel_check);
703703

704704
remapping_tools->add_spacer();

editor/editor_locale_dialog.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -408,15 +408,15 @@ EditorLocaleDialog::EditorLocaleDialog() {
408408
edit_filters->set_text(TTR("Edit Filters"));
409409
edit_filters->set_toggle_mode(true);
410410
edit_filters->set_pressed(false);
411-
edit_filters->connect("toggled", callable_mp(this, &EditorLocaleDialog::_edit_filters));
411+
edit_filters->connect(SceneStringName(toggled), callable_mp(this, &EditorLocaleDialog::_edit_filters));
412412
hb_filter->add_child(edit_filters);
413413
}
414414
{
415415
advanced = memnew(CheckButton);
416416
advanced->set_text(TTR("Advanced"));
417417
advanced->set_toggle_mode(true);
418418
advanced->set_pressed(false);
419-
advanced->connect("toggled", callable_mp(this, &EditorLocaleDialog::_toggle_advanced));
419+
advanced->connect(SceneStringName(toggled), callable_mp(this, &EditorLocaleDialog::_toggle_advanced));
420420
hb_filter->add_child(advanced);
421421
}
422422
vb->add_child(hb_filter);

editor/editor_log.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ EditorLog::EditorLog() {
510510
collapse_button->set_tooltip_text(TTR("Collapse duplicate messages into one log entry. Shows number of occurrences."));
511511
collapse_button->set_toggle_mode(true);
512512
collapse_button->set_pressed(false);
513-
collapse_button->connect("toggled", callable_mp(this, &EditorLog::_set_collapse));
513+
collapse_button->connect(SceneStringName(toggled), callable_mp(this, &EditorLog::_set_collapse));
514514
hb_tools2->add_child(collapse_button);
515515

516516
// Show Search.
@@ -521,7 +521,7 @@ EditorLog::EditorLog() {
521521
show_search_button->set_pressed(true);
522522
show_search_button->set_shortcut(ED_SHORTCUT("editor/open_search", TTR("Focus Search/Filter Bar"), KeyModifierMask::CMD_OR_CTRL | Key::F));
523523
show_search_button->set_shortcut_context(this);
524-
show_search_button->connect("toggled", callable_mp(this, &EditorLog::_set_search_visible));
524+
show_search_button->connect(SceneStringName(toggled), callable_mp(this, &EditorLog::_set_search_visible));
525525
hb_tools2->add_child(show_search_button);
526526

527527
// Message Type Filters.

editor/editor_log.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class EditorLog : public HBoxContainer {
102102
toggle_button->add_theme_color_override("icon_color_pressed", Color(1, 1, 1, 1));
103103
toggle_button->set_focus_mode(FOCUS_NONE);
104104
// When toggled call the callback and pass the MessageType this button is for.
105-
toggle_button->connect("toggled", p_toggled_callback.bind(type));
105+
toggle_button->connect(SceneStringName(toggled), p_toggled_callback.bind(type));
106106
}
107107

108108
int get_message_count() {

editor/editor_properties_vector.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ EditorPropertyVectorN::EditorPropertyVectorN(Variant::Type p_type, bool p_force_
236236
linked->set_stretch_mode(TextureButton::STRETCH_KEEP_CENTERED);
237237
linked->set_tooltip_text(TTR("Lock/Unlock Component Ratio"));
238238
linked->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyVectorN::_update_ratio));
239-
linked->connect(SNAME("toggled"), callable_mp(this, &EditorPropertyVectorN::_store_link));
239+
linked->connect(SceneStringName(toggled), callable_mp(this, &EditorPropertyVectorN::_store_link));
240240
hb->add_child(linked);
241241

242242
add_child(hb);

editor/export/project_export.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1410,12 +1410,12 @@ ProjectExportDialog::ProjectExportDialog() {
14101410
sec_scroll_container->add_child(sec_vb);
14111411

14121412
enc_pck = memnew(CheckButton);
1413-
enc_pck->connect("toggled", callable_mp(this, &ProjectExportDialog::_enc_pck_changed));
1413+
enc_pck->connect(SceneStringName(toggled), callable_mp(this, &ProjectExportDialog::_enc_pck_changed));
14141414
enc_pck->set_text(TTR("Encrypt Exported PCK"));
14151415
sec_vb->add_child(enc_pck);
14161416

14171417
enc_directory = memnew(CheckButton);
1418-
enc_directory->connect("toggled", callable_mp(this, &ProjectExportDialog::_enc_directory_changed));
1418+
enc_directory->connect(SceneStringName(toggled), callable_mp(this, &ProjectExportDialog::_enc_directory_changed));
14191419
enc_directory->set_text(TTR("Encrypt Index (File Names and Info)"));
14201420
sec_vb->add_child(enc_directory);
14211421

editor/groups_editor.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ void GroupsEditor::_show_add_group_dialog() {
648648
add_group_description->set_editable(false);
649649
gc->add_child(add_group_description);
650650

651-
global_group_button->connect("toggled", callable_mp(add_group_description, &LineEdit::set_editable));
651+
global_group_button->connect(SceneStringName(toggled), callable_mp(add_group_description, &LineEdit::set_editable));
652652

653653
add_group_dialog->register_text_enter(add_group_name);
654654
add_group_dialog->register_text_enter(add_group_description);

editor/gui/editor_bottom_panel.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ void EditorBottomPanel::load_layout_from_config(Ref<ConfigFile> p_config_file, c
158158
Button *EditorBottomPanel::add_item(String p_text, Control *p_item, const Ref<Shortcut> &p_shortcut, bool p_at_front) {
159159
Button *tb = memnew(Button);
160160
tb->set_theme_type_variation("BottomPanelButton");
161-
tb->connect("toggled", callable_mp(this, &EditorBottomPanel::_switch_by_control).bind(p_item));
161+
tb->connect(SceneStringName(toggled), callable_mp(this, &EditorBottomPanel::_switch_by_control).bind(p_item));
162162
tb->set_drag_forwarding(Callable(), callable_mp(this, &EditorBottomPanel::_button_drag_hover).bind(tb, p_item), Callable());
163163
tb->set_text(p_text);
164164
tb->set_shortcut(p_shortcut);
@@ -295,5 +295,5 @@ EditorBottomPanel::EditorBottomPanel() {
295295
expand_button->set_theme_type_variation("FlatMenuButton");
296296
expand_button->set_toggle_mode(true);
297297
expand_button->set_shortcut(ED_SHORTCUT_AND_COMMAND("editor/bottom_panel_expand", TTR("Expand Bottom Panel"), KeyModifierMask::SHIFT | Key::F12));
298-
expand_button->connect("toggled", callable_mp(this, &EditorBottomPanel::_expand_button_toggled));
298+
expand_button->connect(SceneStringName(toggled), callable_mp(this, &EditorBottomPanel::_expand_button_toggled));
299299
}

editor/gui/editor_file_dialog.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1779,7 +1779,7 @@ void EditorFileDialog::_update_option_controls() {
17791779
CheckBox *cb = memnew(CheckBox);
17801780
cb->set_pressed(opt.default_idx);
17811781
grid_options->add_child(cb);
1782-
cb->connect("toggled", callable_mp(this, &EditorFileDialog::_option_changed_checkbox_toggled).bind(opt.name));
1782+
cb->connect(SceneStringName(toggled), callable_mp(this, &EditorFileDialog::_option_changed_checkbox_toggled).bind(opt.name));
17831783
selected_options[opt.name] = (bool)opt.default_idx;
17841784
} else {
17851785
OptionButton *ob = memnew(OptionButton);
@@ -2146,7 +2146,7 @@ EditorFileDialog::EditorFileDialog() {
21462146
show_hidden->set_toggle_mode(true);
21472147
show_hidden->set_pressed(is_showing_hidden_files());
21482148
show_hidden->set_tooltip_text(TTR("Toggle the visibility of hidden files."));
2149-
show_hidden->connect("toggled", callable_mp(this, &EditorFileDialog::set_show_hidden_files));
2149+
show_hidden->connect(SceneStringName(toggled), callable_mp(this, &EditorFileDialog::set_show_hidden_files));
21502150
pathhb->add_child(show_hidden);
21512151

21522152
pathhb->add_child(memnew(VSeparator));

editor/gui/editor_run_bar.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ EditorRunBar::EditorRunBar() {
445445
write_movie_button->set_pressed(false);
446446
write_movie_button->set_focus_mode(Control::FOCUS_NONE);
447447
write_movie_button->set_tooltip_text(TTR("Enable Movie Maker mode.\nThe project will run at stable FPS and the visual and audio output will be recorded to a video file."));
448-
write_movie_button->connect("toggled", callable_mp(this, &EditorRunBar::_write_movie_toggled));
448+
write_movie_button->connect(SceneStringName(toggled), callable_mp(this, &EditorRunBar::_write_movie_toggled));
449449

450450
quick_run = memnew(EditorQuickOpen);
451451
add_child(quick_run);

editor/gui/scene_tree_editor.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1769,7 +1769,7 @@ SceneTreeDialog::SceneTreeDialog() {
17691769
// Add 'Show All' button to HBoxContainer next to the filter, visible only when valid_types is defined.
17701770
show_all_nodes = memnew(CheckButton);
17711771
show_all_nodes->set_text(TTR("Show All"));
1772-
show_all_nodes->connect("toggled", callable_mp(this, &SceneTreeDialog::_show_all_nodes_changed));
1772+
show_all_nodes->connect(SceneStringName(toggled), callable_mp(this, &SceneTreeDialog::_show_all_nodes_changed));
17731773
show_all_nodes->set_h_size_flags(Control::SIZE_SHRINK_BEGIN);
17741774
show_all_nodes->hide();
17751775
filter_hbc->add_child(show_all_nodes);

editor/history_dock.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ HistoryDock::HistoryDock() {
245245
current_scene_checkbox->set_text(TTR("Scene"));
246246
current_scene_checkbox->set_h_size_flags(SIZE_EXPAND_FILL);
247247
current_scene_checkbox->set_clip_text(true);
248-
current_scene_checkbox->connect("toggled", callable_mp(this, &HistoryDock::refresh_history).unbind(1));
249-
current_scene_checkbox->connect("toggled", callable_mp(this, &HistoryDock::save_options).unbind(1));
248+
current_scene_checkbox->connect(SceneStringName(toggled), callable_mp(this, &HistoryDock::refresh_history).unbind(1));
249+
current_scene_checkbox->connect(SceneStringName(toggled), callable_mp(this, &HistoryDock::save_options).unbind(1));
250250

251251
global_history_checkbox = memnew(CheckBox);
252252
mode_hb->add_child(global_history_checkbox);
@@ -255,8 +255,8 @@ HistoryDock::HistoryDock() {
255255
global_history_checkbox->set_text(TTR("Global"));
256256
global_history_checkbox->set_h_size_flags(SIZE_EXPAND_FILL);
257257
global_history_checkbox->set_clip_text(true);
258-
global_history_checkbox->connect("toggled", callable_mp(this, &HistoryDock::refresh_history).unbind(1));
259-
global_history_checkbox->connect("toggled", callable_mp(this, &HistoryDock::save_options).unbind(1));
258+
global_history_checkbox->connect(SceneStringName(toggled), callable_mp(this, &HistoryDock::refresh_history).unbind(1));
259+
global_history_checkbox->connect(SceneStringName(toggled), callable_mp(this, &HistoryDock::save_options).unbind(1));
260260

261261
action_list = memnew(ItemList);
262262
action_list->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);

editor/import/audio_stream_import_settings.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ AudioStreamImportSettingsDialog::AudioStreamImportSettingsDialog() {
537537
loop = memnew(CheckBox);
538538
loop->set_text(TTR("Enable"));
539539
loop->set_tooltip_text(TTR("Enable looping."));
540-
loop->connect("toggled", callable_mp(this, &AudioStreamImportSettingsDialog::_settings_changed).unbind(1));
540+
loop->connect(SceneStringName(toggled), callable_mp(this, &AudioStreamImportSettingsDialog::_settings_changed).unbind(1));
541541
loop_hb->add_child(loop);
542542
loop_hb->add_spacer();
543543
loop_hb->add_child(memnew(Label(TTR("Offset:"))));
@@ -554,7 +554,7 @@ AudioStreamImportSettingsDialog::AudioStreamImportSettingsDialog() {
554554
interactive_hb->add_theme_constant_override("separation", 4 * EDSCALE);
555555
bpm_enabled = memnew(CheckBox);
556556
bpm_enabled->set_text((TTR("BPM:")));
557-
bpm_enabled->connect("toggled", callable_mp(this, &AudioStreamImportSettingsDialog::_settings_changed).unbind(1));
557+
bpm_enabled->connect(SceneStringName(toggled), callable_mp(this, &AudioStreamImportSettingsDialog::_settings_changed).unbind(1));
558558
interactive_hb->add_child(bpm_enabled);
559559
bpm_edit = memnew(SpinBox);
560560
bpm_edit->set_max(400);
@@ -565,7 +565,7 @@ AudioStreamImportSettingsDialog::AudioStreamImportSettingsDialog() {
565565
interactive_hb->add_spacer();
566566
beats_enabled = memnew(CheckBox);
567567
beats_enabled->set_text(TTR("Beat Count:"));
568-
beats_enabled->connect("toggled", callable_mp(this, &AudioStreamImportSettingsDialog::_settings_changed).unbind(1));
568+
beats_enabled->connect(SceneStringName(toggled), callable_mp(this, &AudioStreamImportSettingsDialog::_settings_changed).unbind(1));
569569
interactive_hb->add_child(beats_enabled);
570570
beats_edit = memnew(SpinBox);
571571
beats_edit->set_tooltip_text(TTR("Configure the amount of Beats used for music-aware looping. If zero, it will be autodetected from the length.\nIt is recommended to set this value (either manually or by clicking on a beat number in the preview) to ensure looping works properly."));

editor/input_event_configuration_dialog.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ InputEventConfigurationDialog::InputEventConfigurationDialog() {
720720
for (int i = 0; i < MOD_MAX; i++) {
721721
String name = mods[i];
722722
mod_checkboxes[i] = memnew(CheckBox);
723-
mod_checkboxes[i]->connect("toggled", callable_mp(this, &InputEventConfigurationDialog::_mod_toggled).bind(i));
723+
mod_checkboxes[i]->connect(SceneStringName(toggled), callable_mp(this, &InputEventConfigurationDialog::_mod_toggled).bind(i));
724724
mod_checkboxes[i]->set_text(name);
725725
mod_checkboxes[i]->set_tooltip_text(TTR(mods_tip[i]));
726726
mod_container->add_child(mod_checkboxes[i]);
@@ -729,7 +729,7 @@ InputEventConfigurationDialog::InputEventConfigurationDialog() {
729729
mod_container->add_child(memnew(VSeparator));
730730

731731
autoremap_command_or_control_checkbox = memnew(CheckBox);
732-
autoremap_command_or_control_checkbox->connect("toggled", callable_mp(this, &InputEventConfigurationDialog::_autoremap_command_or_control_toggled));
732+
autoremap_command_or_control_checkbox->connect(SceneStringName(toggled), callable_mp(this, &InputEventConfigurationDialog::_autoremap_command_or_control_toggled));
733733
autoremap_command_or_control_checkbox->set_pressed(false);
734734
autoremap_command_or_control_checkbox->set_text(TTR("Command / Control (auto)"));
735735
autoremap_command_or_control_checkbox->set_tooltip_text(TTR("Automatically remaps between 'Meta' ('Command') and 'Control' depending on current platform."));

editor/plugins/animation_blend_space_1d_editor.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
713713
top_hb->add_child(memnew(Label(TTR("Sync:"))));
714714
sync = memnew(CheckBox);
715715
top_hb->add_child(sync);
716-
sync->connect("toggled", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_config_changed));
716+
sync->connect(SceneStringName(toggled), callable_mp(this, &AnimationNodeBlendSpace1DEditor::_config_changed));
717717

718718
top_hb->add_child(memnew(VSeparator));
719719

editor/plugins/animation_blend_space_2d_editor.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
961961
top_hb->add_child(memnew(Label(TTR("Sync:"))));
962962
sync = memnew(CheckBox);
963963
top_hb->add_child(sync);
964-
sync->connect("toggled", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_config_changed));
964+
sync->connect(SceneStringName(toggled), callable_mp(this, &AnimationNodeBlendSpace2DEditor::_config_changed));
965965

966966
top_hb->add_child(memnew(VSeparator));
967967

editor/plugins/canvas_item_editor_plugin.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -5409,7 +5409,7 @@ CanvasItemEditor::CanvasItemEditor() {
54095409
smart_snap_button->set_theme_type_variation("FlatButton");
54105410
main_menu_hbox->add_child(smart_snap_button);
54115411
smart_snap_button->set_toggle_mode(true);
5412-
smart_snap_button->connect("toggled", callable_mp(this, &CanvasItemEditor::_button_toggle_smart_snap));
5412+
smart_snap_button->connect(SceneStringName(toggled), callable_mp(this, &CanvasItemEditor::_button_toggle_smart_snap));
54135413
smart_snap_button->set_tooltip_text(TTR("Toggle smart snapping."));
54145414
smart_snap_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/use_smart_snap", TTR("Use Smart Snap"), KeyModifierMask::SHIFT | Key::S));
54155415
smart_snap_button->set_shortcut_context(this);
@@ -5418,7 +5418,7 @@ CanvasItemEditor::CanvasItemEditor() {
54185418
grid_snap_button->set_theme_type_variation("FlatButton");
54195419
main_menu_hbox->add_child(grid_snap_button);
54205420
grid_snap_button->set_toggle_mode(true);
5421-
grid_snap_button->connect("toggled", callable_mp(this, &CanvasItemEditor::_button_toggle_grid_snap));
5421+
grid_snap_button->connect(SceneStringName(toggled), callable_mp(this, &CanvasItemEditor::_button_toggle_grid_snap));
54225422
grid_snap_button->set_tooltip_text(TTR("Toggle grid snapping."));
54235423
grid_snap_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/use_grid_snap", TTR("Use Grid Snap"), KeyModifierMask::SHIFT | Key::G));
54245424
grid_snap_button->set_shortcut_context(this);
@@ -5511,7 +5511,7 @@ CanvasItemEditor::CanvasItemEditor() {
55115511
override_camera_button = memnew(Button);
55125512
override_camera_button->set_theme_type_variation("FlatButton");
55135513
main_menu_hbox->add_child(override_camera_button);
5514-
override_camera_button->connect("toggled", callable_mp(this, &CanvasItemEditor::_button_override_camera));
5514+
override_camera_button->connect(SceneStringName(toggled), callable_mp(this, &CanvasItemEditor::_button_override_camera));
55155515
override_camera_button->set_toggle_mode(true);
55165516
override_camera_button->set_disabled(true);
55175517
_update_override_camera_button(false);

editor/plugins/control_editor_plugin.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,7 @@ ControlEditorToolbar::ControlEditorToolbar() {
10841084
anchor_mode_button->set_toggle_mode(true);
10851085
anchor_mode_button->set_tooltip_text(TTR("When active, moving Control nodes changes their anchors instead of their offsets."));
10861086
add_child(anchor_mode_button);
1087-
anchor_mode_button->connect("toggled", callable_mp(this, &ControlEditorToolbar::_anchor_mode_toggled));
1087+
anchor_mode_button->connect(SceneStringName(toggled), callable_mp(this, &ControlEditorToolbar::_anchor_mode_toggled));
10881088

10891089
// Container tools.
10901090
containers_button = memnew(ControlEditorPopupButton);

editor/plugins/curve_editor_plugin.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,7 @@ CurveEditor::CurveEditor() {
10031003
snap_button->set_tooltip_text(TTR("Toggle Grid Snap"));
10041004
snap_button->set_toggle_mode(true);
10051005
toolbar->add_child(snap_button);
1006-
snap_button->connect("toggled", callable_mp(this, &CurveEditor::_set_snap_enabled));
1006+
snap_button->connect(SceneStringName(toggled), callable_mp(this, &CurveEditor::_set_snap_enabled));
10071007

10081008
toolbar->add_child(memnew(VSeparator));
10091009

editor/plugins/gradient_editor_plugin.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ GradientEditor::GradientEditor() {
632632
snap_button->set_tooltip_text(TTR("Toggle Grid Snap"));
633633
snap_button->set_toggle_mode(true);
634634
toolbar->add_child(snap_button);
635-
snap_button->connect("toggled", callable_mp(this, &GradientEditor::_set_snap_enabled));
635+
snap_button->connect(SceneStringName(toggled), callable_mp(this, &GradientEditor::_set_snap_enabled));
636636

637637
snap_count_edit = memnew(EditorSpinSlider);
638638
snap_count_edit->set_min(2);

0 commit comments

Comments
 (0)