diff --git a/src/Autoload/Global.gd b/src/Autoload/Global.gd index 0456aded9..64b74cfd2 100644 --- a/src/Autoload/Global.gd +++ b/src/Autoload/Global.gd @@ -1,6 +1,7 @@ extends Node signal project_changed +signal cel_changed enum LayerTypes { PIXEL, GROUP } enum GridTypes { CARTESIAN, ISOMETRIC, ALL } @@ -491,6 +492,7 @@ func _project_changed(value: int) -> void: connect("project_changed", current_project, "change_project") emit_signal("project_changed") disconnect("project_changed", current_project, "change_project") + emit_signal("cel_changed") func _renderer_changed(value: int) -> void: diff --git a/src/Classes/Project.gd b/src/Classes/Project.gd index 7e29e740c..0da9da7ed 100644 --- a/src/Classes/Project.gd +++ b/src/Classes/Project.gd @@ -3,8 +3,6 @@ class_name Project extends Reference # A class for project properties. -signal cel_changed - var name := "" setget _name_changed var size: Vector2 setget _size_changed var undo_redo := UndoRedo.new() @@ -518,7 +516,7 @@ func change_cel(new_frame: int, new_layer := -1) -> void: Global.layer_opacity_slider.value = cel_opacity * 100 Global.canvas.update() Global.transparent_checker.update_rect() - emit_signal("cel_changed") + Global.emit_signal("cel_changed") func toggle_frame_buttons() -> void: