mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-19 01:29:49 +00:00
Fixed issue where "Layer 0" would be renamed when it changed position
This commit is contained in:
parent
4f307ae7b3
commit
cd811d7e78
|
@ -10,7 +10,7 @@ var new_cels_linked := false
|
||||||
var linked_cels := [] # Array of Frames
|
var linked_cels := [] # Array of Frames
|
||||||
|
|
||||||
|
|
||||||
func _init(_name := tr("Layer") + " 0", _visible := true, _locked := false, _frame_container := HBoxContainer.new(), _new_cels_linked := false, _linked_cels := []) -> void:
|
func _init(_name := "", _visible := true, _locked := false, _frame_container := HBoxContainer.new(), _new_cels_linked := false, _linked_cels := []) -> void:
|
||||||
name = _name
|
name = _name
|
||||||
visible = _visible
|
visible = _visible
|
||||||
locked = _locked
|
locked = _locked
|
||||||
|
|
|
@ -125,7 +125,7 @@ func change_project() -> void:
|
||||||
# Create layer buttons
|
# Create layer buttons
|
||||||
var layer_container = load("res://src/UI/Timeline/LayerButton.tscn").instance()
|
var layer_container = load("res://src/UI/Timeline/LayerButton.tscn").instance()
|
||||||
layer_container.layer = i
|
layer_container.layer = i
|
||||||
if layers[i].name == tr("Layer") + " 0":
|
if layers[i].name == "":
|
||||||
layers[i].name = tr("Layer") + " %s" % i
|
layers[i].name = tr("Layer") + " %s" % i
|
||||||
|
|
||||||
Global.layers_container.add_child(layer_container)
|
Global.layers_container.add_child(layer_container)
|
||||||
|
@ -432,7 +432,7 @@ func layers_changed(value : Array) -> void:
|
||||||
for i in range(layers.size() - 1, -1, -1):
|
for i in range(layers.size() - 1, -1, -1):
|
||||||
var layer_container = load("res://src/UI/Timeline/LayerButton.tscn").instance()
|
var layer_container = load("res://src/UI/Timeline/LayerButton.tscn").instance()
|
||||||
layer_container.layer = i
|
layer_container.layer = i
|
||||||
if layers[i].name == tr("Layer") + " 0":
|
if layers[i].name == "":
|
||||||
layers[i].name = tr("Layer") + " %s" % i
|
layers[i].name = tr("Layer") + " %s" % i
|
||||||
|
|
||||||
Global.layers_container.add_child(layer_container)
|
Global.layers_container.add_child(layer_container)
|
||||||
|
|
|
@ -38,8 +38,6 @@ func _ready() -> void:
|
||||||
Global.window_title = tr("untitled") + " - Pixelorama " + Global.current_version
|
Global.window_title = tr("untitled") + " - Pixelorama " + Global.current_version
|
||||||
|
|
||||||
Global.current_project.layers[0].name = tr("Layer") + " 0"
|
Global.current_project.layers[0].name = tr("Layer") + " 0"
|
||||||
Global.layers_container.get_child(0).label.text = Global.current_project.layers[0].name
|
|
||||||
Global.layers_container.get_child(0).line_edit.text = Global.current_project.layers[0].name
|
|
||||||
|
|
||||||
Import.import_brushes(Global.directory_module.get_brushes_search_path_in_order())
|
Import.import_brushes(Global.directory_module.get_brushes_search_path_in_order())
|
||||||
Import.import_patterns(Global.directory_module.get_patterns_search_path_in_order())
|
Import.import_patterns(Global.directory_module.get_patterns_search_path_in_order())
|
||||||
|
|
Loading…
Reference in a new issue