mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
Fix canvas not immediately updating when adding/removing 3D objects
This commit is contained in:
parent
ff8f06bd47
commit
895636272b
|
@ -589,7 +589,7 @@ func undo_or_redo(
|
|||
general_undo(project)
|
||||
else:
|
||||
general_redo(project)
|
||||
var action_name: String = project.undo_redo.get_current_action_name()
|
||||
var action_name := project.undo_redo.get_current_action_name()
|
||||
if (
|
||||
action_name
|
||||
in [
|
||||
|
@ -615,7 +615,7 @@ func undo_or_redo(
|
|||
if action_name == "Scale":
|
||||
for i in project.frames.size():
|
||||
for j in project.layers.size():
|
||||
var current_cel: BaseCel = project.frames[i].cels[j]
|
||||
var current_cel := project.frames[i].cels[j]
|
||||
if current_cel is Cel3D:
|
||||
current_cel.size_changed(project.size)
|
||||
else:
|
||||
|
@ -628,6 +628,7 @@ func undo_or_redo(
|
|||
project.selection_map_changed()
|
||||
cursor_position_label.text = "[%s×%s]" % [project.size.x, project.size.y]
|
||||
|
||||
await RenderingServer.frame_post_draw
|
||||
canvas.queue_redraw()
|
||||
second_viewport.get_child(0).get_node("CanvasPreview").queue_redraw()
|
||||
canvas_preview_container.canvas_preview.queue_redraw()
|
||||
|
|
|
@ -528,9 +528,13 @@ func change_cel(new_frame: int, new_layer := -1) -> void:
|
|||
layers[current_layer].blend_mode
|
||||
)
|
||||
Global.animation_timeline.blend_modes_button.selected = blend_mode_index
|
||||
Global.canvas.queue_redraw()
|
||||
|
||||
Global.transparent_checker.update_rect()
|
||||
Global.cel_changed.emit()
|
||||
if get_current_cel() is Cel3D:
|
||||
await RenderingServer.frame_post_draw
|
||||
await RenderingServer.frame_post_draw
|
||||
Global.canvas.queue_redraw()
|
||||
|
||||
|
||||
func toggle_frame_buttons() -> void:
|
||||
|
|
Loading…
Reference in a new issue