diff --git a/src/Classes/Layer.gd b/src/Classes/Layer.gd index 9a2bb85f2..d604c9877 100644 --- a/src/Classes/Layer.gd +++ b/src/Classes/Layer.gd @@ -10,7 +10,7 @@ var new_cels_linked := false 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 visible = _visible locked = _locked diff --git a/src/Classes/Project.gd b/src/Classes/Project.gd index b91628cbb..c215ec5b1 100644 --- a/src/Classes/Project.gd +++ b/src/Classes/Project.gd @@ -125,7 +125,7 @@ func change_project() -> void: # Create layer buttons var layer_container = load("res://src/UI/Timeline/LayerButton.tscn").instance() layer_container.layer = i - if layers[i].name == tr("Layer") + " 0": + if layers[i].name == "": layers[i].name = tr("Layer") + " %s" % i 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): var layer_container = load("res://src/UI/Timeline/LayerButton.tscn").instance() layer_container.layer = i - if layers[i].name == tr("Layer") + " 0": + if layers[i].name == "": layers[i].name = tr("Layer") + " %s" % i Global.layers_container.add_child(layer_container) diff --git a/src/Main.gd b/src/Main.gd index d4aeca4f5..d6c09a859 100644 --- a/src/Main.gd +++ b/src/Main.gd @@ -38,8 +38,6 @@ func _ready() -> void: Global.window_title = tr("untitled") + " - Pixelorama " + Global.current_version 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_patterns(Global.directory_module.get_patterns_search_path_in_order())