Reuse shared history service in document bridges
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "legacy_app_dialog_services.h"
|
||||
#include "legacy_document_canvas_services.h"
|
||||
#include "legacy_canvas_view_services.h"
|
||||
#include "legacy_history_services.h"
|
||||
#include "legacy_ui_overlay_services.h"
|
||||
#include "node_dialog_open.h"
|
||||
|
||||
@@ -15,28 +16,9 @@
|
||||
namespace pp::panopainter {
|
||||
namespace {
|
||||
|
||||
class LegacyDocumentHistoryServices final : public pp::app::HistoryUiServices {
|
||||
public:
|
||||
void invoke_undo() override
|
||||
{
|
||||
ActionManager::undo();
|
||||
}
|
||||
|
||||
void invoke_redo() override
|
||||
{
|
||||
ActionManager::redo();
|
||||
}
|
||||
|
||||
void clear_history() override
|
||||
{
|
||||
ActionManager::clear();
|
||||
}
|
||||
};
|
||||
|
||||
pp::foundation::Status apply_document_history(const pp::app::HistoryUiPlan& plan)
|
||||
{
|
||||
LegacyDocumentHistoryServices services;
|
||||
return pp::app::execute_history_ui_plan(plan, services);
|
||||
return pp::panopainter::execute_legacy_history_plan(plan);
|
||||
}
|
||||
|
||||
void log_legacy_document_save_snapshot(
|
||||
|
||||
Reference in New Issue
Block a user