mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 13:44:42 -04:00
When opening a project and the current tab is empty, open it in that tab
If the current project is empty (only 1 layer and frame, no tags and the image has no content - is invisible) and the user is opening a project, then the opened project will not open a new tab of its own, and will use the currently opened one instead.
This commit is contained in:
parent
d38a6efe9b
commit
01ce3a3932
2 changed files with 21 additions and 14 deletions
|
@ -230,7 +230,7 @@ func frame_changed(value : int) -> void:
|
|||
# Select the new frame
|
||||
if current_frame < Global.frame_ids.get_child_count():
|
||||
Global.frame_ids.get_child(current_frame).add_color_override("font_color", Global.control.theme.get_color("Selected Color", "Label"))
|
||||
if current_frame < layers[current_layer].frame_container.get_child_count():
|
||||
if layers and current_frame < layers[current_layer].frame_container.get_child_count():
|
||||
layers[current_layer].frame_container.get_child(current_frame).pressed = true
|
||||
|
||||
Global.disable_button(Global.remove_frame_button, frames.size() == 1)
|
||||
|
@ -259,6 +259,8 @@ func layer_changed(value : int) -> void:
|
|||
|
||||
|
||||
func toggle_layer_buttons_layers() -> void:
|
||||
if !layers:
|
||||
return
|
||||
if layers[current_layer].locked:
|
||||
Global.disable_button(Global.remove_layer_button, true)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue