Skip to content

Commit 320ff6b

Browse files
committed
Fix Redundant calls of CIE _update_lock_and_group_button on SceneTree selection.
1 parent 3c7f9b9 commit 320ff6b

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

editor/scene/canvas_item_editor_plugin.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4165,7 +4165,6 @@ void CanvasItemEditor::_notification(int p_what) {
41654165
case NOTIFICATION_READY: {
41664166
_update_lock_and_group_button();
41674167

4168-
SceneTreeDock::get_singleton()->get_tree_editor()->connect("node_changed", callable_mp(this, &CanvasItemEditor::_update_lock_and_group_button));
41694168
ProjectSettings::get_singleton()->connect("settings_changed", callable_mp(this, &CanvasItemEditor::_project_settings_changed));
41704169
} break;
41714170

editor/scene/scene_tree_editor.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i
133133
undo_redo->create_action(TTR("Unlock Node"));
134134
undo_redo->add_do_method(n, "remove_meta", "_edit_lock_");
135135
undo_redo->add_undo_method(n, "set_meta", "_edit_lock_", true);
136-
undo_redo->add_do_method(this, "_update_tree");
137-
undo_redo->add_undo_method(this, "_update_tree");
138136
undo_redo->add_do_method(this, "emit_signal", "node_changed");
139137
undo_redo->add_undo_method(this, "emit_signal", "node_changed");
138+
undo_redo->add_do_method(CanvasItemEditor::get_singleton(), "emit_signal", "item_lock_status_changed");
139+
undo_redo->add_undo_method(CanvasItemEditor::get_singleton(), "emit_signal", "item_lock_status_changed");
140140
undo_redo->commit_action();
141141
} else if (p_id == BUTTON_PIN) {
142142
if (n->is_class("AnimationMixer")) {
@@ -150,10 +150,10 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i
150150
if (n->is_class("CanvasItem") || n->is_class("Node3D")) {
151151
undo_redo->add_do_method(n, "remove_meta", "_edit_group_");
152152
undo_redo->add_undo_method(n, "set_meta", "_edit_group_", true);
153-
undo_redo->add_do_method(this, "_update_tree");
154-
undo_redo->add_undo_method(this, "_update_tree");
155153
undo_redo->add_do_method(this, "emit_signal", "node_changed");
156154
undo_redo->add_undo_method(this, "emit_signal", "node_changed");
155+
undo_redo->add_do_method(CanvasItemEditor::get_singleton(), "emit_signal", "item_lock_status_changed");
156+
undo_redo->add_undo_method(CanvasItemEditor::get_singleton(), "emit_signal", "item_lock_status_changed");
157157
}
158158
undo_redo->commit_action();
159159
} else if (p_id == BUTTON_WARNING) {

0 commit comments

Comments
 (0)