Use setter method for layers to update the UI

Instead of updating it in undo and redo methods
This commit is contained in:
OverloadedOrama 2020-02-28 03:27:22 +02:00
parent 2bfae68755
commit 60aed9efba
6 changed files with 96 additions and 51 deletions

View file

@ -164,9 +164,8 @@ func _ready() -> void:
Global.window_title = "(" + tr("untitled") + ") - Pixelorama"
Global.layers[0][0] = tr("Layer") + " 0"
Global.layers_container.get_child(1).label.text = Global.layers[0][0]
Global.layers_container.get_child(1).line_edit.text = Global.layers[0][0]
Global.canvas.generate_layer_panels()
Global.layers_container.get_child(0).label.text = Global.layers[0][0]
Global.layers_container.get_child(0).line_edit.text = Global.layers[0][0]
Import.import_brushes("Brushes")