From c2083565bf4b856f20976d359c09f882ff4f212d Mon Sep 17 00:00:00 2001 From: omigamedev Date: Mon, 15 Jun 2026 22:44:41 +0200 Subject: [PATCH] Extract open legacy project history helper --- src/legacy_document_open_services.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/legacy_document_open_services.cpp b/src/legacy_document_open_services.cpp index 344f0470..68450d4c 100644 --- a/src/legacy_document_open_services.cpp +++ b/src/legacy_document_open_services.cpp @@ -38,6 +38,14 @@ pp::foundation::Status apply_document_history(const pp::app::HistoryUiPlan& plan return pp::app::execute_history_ui_plan(plan, services); } +void apply_open_legacy_project_history(const pp::app::DocumentOpenRoute& route) +{ + const auto history_status = apply_document_history(pp::app::plan_document_open_history(route)); + if (!history_status.ok()) { + LOG("Project open history effect failed: %s", history_status.message); + } +} + void refresh_opened_legacy_project_layers(App& app) { app.title_update(); @@ -79,10 +87,7 @@ void open_legacy_project(App& app, const pp::app::DocumentOpenRoute& route) app.canvas->m_canvas->project_open(route.path, [&app](bool success) { handle_open_legacy_project_result(app, success); }); - const auto history_status = apply_document_history(pp::app::plan_document_open_history(route)); - if (!history_status.ok()) { - LOG("Project open history effect failed: %s", history_status.message); - } + apply_open_legacy_project_history(route); } void reconcile_downloaded_project_open(App& app)