mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Fix Redundant calls of CIE _update_lock_and_group_button on SceneTree selection.
This commit is contained in:
parent
3c7f9b9372
commit
320ff6bc75
2 changed files with 4 additions and 5 deletions
|
@ -4165,7 +4165,6 @@ void CanvasItemEditor::_notification(int p_what) {
|
||||||
case NOTIFICATION_READY: {
|
case NOTIFICATION_READY: {
|
||||||
_update_lock_and_group_button();
|
_update_lock_and_group_button();
|
||||||
|
|
||||||
SceneTreeDock::get_singleton()->get_tree_editor()->connect("node_changed", callable_mp(this, &CanvasItemEditor::_update_lock_and_group_button));
|
|
||||||
ProjectSettings::get_singleton()->connect("settings_changed", callable_mp(this, &CanvasItemEditor::_project_settings_changed));
|
ProjectSettings::get_singleton()->connect("settings_changed", callable_mp(this, &CanvasItemEditor::_project_settings_changed));
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
|
|
|
@ -133,10 +133,10 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i
|
||||||
undo_redo->create_action(TTR("Unlock Node"));
|
undo_redo->create_action(TTR("Unlock Node"));
|
||||||
undo_redo->add_do_method(n, "remove_meta", "_edit_lock_");
|
undo_redo->add_do_method(n, "remove_meta", "_edit_lock_");
|
||||||
undo_redo->add_undo_method(n, "set_meta", "_edit_lock_", true);
|
undo_redo->add_undo_method(n, "set_meta", "_edit_lock_", true);
|
||||||
undo_redo->add_do_method(this, "_update_tree");
|
|
||||||
undo_redo->add_undo_method(this, "_update_tree");
|
|
||||||
undo_redo->add_do_method(this, "emit_signal", "node_changed");
|
undo_redo->add_do_method(this, "emit_signal", "node_changed");
|
||||||
undo_redo->add_undo_method(this, "emit_signal", "node_changed");
|
undo_redo->add_undo_method(this, "emit_signal", "node_changed");
|
||||||
|
undo_redo->add_do_method(CanvasItemEditor::get_singleton(), "emit_signal", "item_lock_status_changed");
|
||||||
|
undo_redo->add_undo_method(CanvasItemEditor::get_singleton(), "emit_signal", "item_lock_status_changed");
|
||||||
undo_redo->commit_action();
|
undo_redo->commit_action();
|
||||||
} else if (p_id == BUTTON_PIN) {
|
} else if (p_id == BUTTON_PIN) {
|
||||||
if (n->is_class("AnimationMixer")) {
|
if (n->is_class("AnimationMixer")) {
|
||||||
|
@ -150,10 +150,10 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i
|
||||||
if (n->is_class("CanvasItem") || n->is_class("Node3D")) {
|
if (n->is_class("CanvasItem") || n->is_class("Node3D")) {
|
||||||
undo_redo->add_do_method(n, "remove_meta", "_edit_group_");
|
undo_redo->add_do_method(n, "remove_meta", "_edit_group_");
|
||||||
undo_redo->add_undo_method(n, "set_meta", "_edit_group_", true);
|
undo_redo->add_undo_method(n, "set_meta", "_edit_group_", true);
|
||||||
undo_redo->add_do_method(this, "_update_tree");
|
|
||||||
undo_redo->add_undo_method(this, "_update_tree");
|
|
||||||
undo_redo->add_do_method(this, "emit_signal", "node_changed");
|
undo_redo->add_do_method(this, "emit_signal", "node_changed");
|
||||||
undo_redo->add_undo_method(this, "emit_signal", "node_changed");
|
undo_redo->add_undo_method(this, "emit_signal", "node_changed");
|
||||||
|
undo_redo->add_do_method(CanvasItemEditor::get_singleton(), "emit_signal", "item_lock_status_changed");
|
||||||
|
undo_redo->add_undo_method(CanvasItemEditor::get_singleton(), "emit_signal", "item_lock_status_changed");
|
||||||
}
|
}
|
||||||
undo_redo->commit_action();
|
undo_redo->commit_action();
|
||||||
} else if (p_id == BUTTON_WARNING) {
|
} else if (p_id == BUTTON_WARNING) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue