Centralize canvas progress teardown
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "app.h"
|
||||
#include "legacy_gl_renderbuffer_dispatch.h"
|
||||
#include "legacy_ui_gl_dispatch.h"
|
||||
#include "legacy_ui_overlay_services.h"
|
||||
#include "app_core/document_canvas.h"
|
||||
#include "texture.h"
|
||||
#include "node_progress_bar.h"
|
||||
@@ -2205,7 +2206,7 @@ void Canvas::export_layers_thread(std::string path)
|
||||
img.save_png(fmt::format("{}-layer{:02d}-{}.png", path, i, l->m_name));
|
||||
pb->increment();
|
||||
}
|
||||
pb->destroy();
|
||||
pp::panopainter::close_legacy_dialog_node(*pb);
|
||||
}
|
||||
|
||||
void Canvas::export_anim_frames(std::string path, std::function<void()> on_complete)
|
||||
@@ -2231,7 +2232,7 @@ void Canvas::export_anim_frames_thread(std::string path)
|
||||
export_equirectangular_thread(fmt::format("{}-{:02d}.png", path, i));
|
||||
pb->increment();
|
||||
}
|
||||
pb->destroy();
|
||||
pp::panopainter::close_legacy_dialog_node(*pb);
|
||||
}
|
||||
|
||||
void Canvas::export_anim_mp4(std::string path, std::function<void()> on_complete)
|
||||
@@ -2270,7 +2271,7 @@ void Canvas::export_anim_mp4_thread(std::string path)
|
||||
pb->increment();
|
||||
}
|
||||
mp4.write_mp4(path);
|
||||
pb->destroy();
|
||||
pp::panopainter::close_legacy_dialog_node(*pb);
|
||||
}
|
||||
|
||||
void Canvas::export_cube_faces(std::string file_name, std::function<void()> on_complete)
|
||||
@@ -2314,7 +2315,7 @@ void Canvas::export_cube_faces_thread(std::string file_name)
|
||||
#endif
|
||||
}
|
||||
|
||||
pb->destroy();
|
||||
pp::panopainter::close_legacy_dialog_node(*pb);
|
||||
|
||||
#ifdef __OBJC__
|
||||
static char name[128];
|
||||
@@ -2615,7 +2616,7 @@ bool Canvas::project_save_thread(std::string file_path, bool show_progress)
|
||||
|
||||
if (post_commit_plan.dismisses_progress_ui)
|
||||
{
|
||||
pb->destroy();
|
||||
pp::panopainter::close_legacy_dialog_node(*pb);
|
||||
}
|
||||
if (post_commit_plan.updates_title)
|
||||
{
|
||||
@@ -2845,7 +2846,7 @@ bool Canvas::project_open_thread(std::string file_path)
|
||||
m_newdoc = false;
|
||||
if (App::I->layout.m_loaded)
|
||||
{
|
||||
pb->destroy();
|
||||
pp::panopainter::close_legacy_dialog_node(*pb);
|
||||
App::I->ui_task([] {
|
||||
App::I->title_update();
|
||||
App::I->update_rec_frames();
|
||||
|
||||
Reference in New Issue
Block a user