Extract open legacy project history helper
This commit is contained in:
@@ -38,6 +38,14 @@ pp::foundation::Status apply_document_history(const pp::app::HistoryUiPlan& plan
|
|||||||
return pp::app::execute_history_ui_plan(plan, services);
|
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)
|
void refresh_opened_legacy_project_layers(App& app)
|
||||||
{
|
{
|
||||||
app.title_update();
|
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) {
|
app.canvas->m_canvas->project_open(route.path, [&app](bool success) {
|
||||||
handle_open_legacy_project_result(app, success);
|
handle_open_legacy_project_result(app, success);
|
||||||
});
|
});
|
||||||
const auto history_status = apply_document_history(pp::app::plan_document_open_history(route));
|
apply_open_legacy_project_history(route);
|
||||||
if (!history_status.ok()) {
|
|
||||||
LOG("Project open history effect failed: %s", history_status.message);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void reconcile_downloaded_project_open(App& app)
|
void reconcile_downloaded_project_open(App& app)
|
||||||
|
|||||||
Reference in New Issue
Block a user