mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 09:09:47 +00:00
Fix add_new_layer() in ExtensionsAPI
This commit is contained in:
parent
60c54601ce
commit
89de8ab461
|
@ -673,7 +673,7 @@ class ProjectAPI:
|
||||||
var old_current := project.current_layer
|
var old_current := project.current_layer
|
||||||
project.current_layer = above_layer # temporary assignment
|
project.current_layer = above_layer # temporary assignment
|
||||||
if type >= 0 and type < Global.LayerTypes.size():
|
if type >= 0 and type < Global.LayerTypes.size():
|
||||||
Global.animation_timeline.add_layer(type)
|
Global.animation_timeline.on_add_layer_list_id_pressed(type)
|
||||||
if name != "":
|
if name != "":
|
||||||
project.layers[above_layer + 1].name = name
|
project.layers[above_layer + 1].name = name
|
||||||
var l_idx := Global.layer_vbox.get_child_count() - (above_layer + 2)
|
var l_idx := Global.layer_vbox.get_child_count() - (above_layer + 2)
|
||||||
|
|
|
@ -79,7 +79,7 @@ func _ready() -> void:
|
||||||
cel_size_slider.min_value = min_cel_size
|
cel_size_slider.min_value = min_cel_size
|
||||||
cel_size_slider.max_value = max_cel_size
|
cel_size_slider.max_value = max_cel_size
|
||||||
cel_size_slider.value = cel_size
|
cel_size_slider.value = cel_size
|
||||||
add_layer_list.get_popup().id_pressed.connect(_on_add_layer_list_id_pressed)
|
add_layer_list.get_popup().id_pressed.connect(on_add_layer_list_id_pressed)
|
||||||
frame_scroll_bar.value_changed.connect(_frame_scroll_changed)
|
frame_scroll_bar.value_changed.connect(_frame_scroll_changed)
|
||||||
animation_timer.wait_time = 1 / Global.current_project.fps
|
animation_timer.wait_time = 1 / Global.current_project.fps
|
||||||
fps_spinbox.value = Global.current_project.fps
|
fps_spinbox.value = Global.current_project.fps
|
||||||
|
@ -853,7 +853,7 @@ func _on_add_layer_pressed() -> void:
|
||||||
add_layer(layer, project)
|
add_layer(layer, project)
|
||||||
|
|
||||||
|
|
||||||
func _on_add_layer_list_id_pressed(id: int) -> void:
|
func on_add_layer_list_id_pressed(id: int) -> void:
|
||||||
if id == Global.LayerTypes.TILEMAP:
|
if id == Global.LayerTypes.TILEMAP:
|
||||||
new_tile_map_layer_dialog.popup_centered()
|
new_tile_map_layer_dialog.popup_centered()
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue