From 991eb5a6150d7e0bb5469ab9e14be6b46f5a19f2 Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Sun, 3 May 2020 19:19:12 +0300 Subject: [PATCH] Export optimization process_frame() was being called twice when the export dialog appeared, and the frame number was different than the one already stored in the export dialog --- src/UI/Dialogs/ExportDialog.gd | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/UI/Dialogs/ExportDialog.gd b/src/UI/Dialogs/ExportDialog.gd index cbfd81f1a..882a402fa 100644 --- a/src/UI/Dialogs/ExportDialog.gd +++ b/src/UI/Dialogs/ExportDialog.gd @@ -88,8 +88,10 @@ func show_tab() -> void: if not was_exported: frame_number = Global.current_frame + 1 $VBoxContainer/FrameOptions/FrameNumber/FrameNumber.max_value = Global.canvases.size() + 1 + var prev_frame_number = $VBoxContainer/FrameOptions/FrameNumber/FrameNumber.value $VBoxContainer/FrameOptions/FrameNumber/FrameNumber.value = frame_number - process_frame() + if prev_frame_number == frame_number: + process_frame() $VBoxContainer/FrameOptions.show() ExportTab.SPRITESHEET: file_format = FileFormat.PNG @@ -469,7 +471,7 @@ func _on_ExportDialog_about_to_show() -> void: $VBoxContainer/Options/Resize.value = resize $VBoxContainer/Options/Interpolation.selected = interpolation $VBoxContainer/Path/PathLineEdit.text = directory_path - $Popups/PathDialog.current_path = directory_path + $Popups/PathDialog.current_dir = directory_path $VBoxContainer/File/FileLineEdit.text = file_name $VBoxContainer/File/FileFormat.selected = file_format show_tab()