Extract open legacy project history helper

This commit is contained in:
2026-06-15 22:44:41 +02:00
parent de2aedb96b
commit c2083565bf

View File

@@ -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)