mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 22:54:44 -04:00
Change canvas and timeline when a tab is being pressed
This commit is contained in:
parent
709a6d470e
commit
ae381a8714
4 changed files with 99 additions and 40 deletions
|
@ -3,6 +3,7 @@ extends Tabs
|
|||
|
||||
func _on_Tabs_tab_changed(tab : int):
|
||||
Global.current_project_index = tab
|
||||
Global.canvas.update()
|
||||
|
||||
|
||||
func _on_Tabs_tab_close(tab : int):
|
||||
|
|
|
@ -363,6 +363,8 @@ func add_layer(is_new := true) -> void:
|
|||
|
||||
|
||||
func _on_RemoveLayer_pressed() -> void:
|
||||
if Global.current_project.layers.size() == 1:
|
||||
return
|
||||
var new_layers : Array = Global.current_project.layers.duplicate()
|
||||
new_layers.remove(Global.current_project.current_layer)
|
||||
Global.current_project.undos += 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue