Route cloud download reconcile through document open services

This commit is contained in:
2026-06-15 20:31:17 +02:00
parent fdf2e56182
commit 80533fae5b
6 changed files with 75 additions and 13 deletions

View File

@@ -141,4 +141,23 @@ pp::foundation::Status execute_legacy_document_open_plan(
return pp::app::execute_document_open_plan(action, route, services);
}
void execute_legacy_downloaded_project_open(
App& app,
std::string_view path,
std::string_view name)
{
const auto reset_status = execute_legacy_canvas_camera_reset(app);
if (!reset_status.ok())
LOG("Cloud download camera reset failed: %s", reset_status.message);
app.layers->clear();
app.canvas->m_canvas->project_open_thread(std::string(path));
app.doc_name = std::string(name);
app.title_update();
for (auto& layer : app.canvas->m_canvas->m_layers)
app.layers->add_layer(layer->m_name.c_str(), false);
ActionManager::clear();
}
} // namespace pp::panopainter