--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/edithistory.cpp Wed Sep 22 00:25:31 2021 +0300 @@ -0,0 +1,36 @@ +#include "edithistory.h" + +EditHistory::EditHistory() +{ + +} + +void InsertHistoryEntry::undo(Model::EditContext &editContext) +{ + editContext.remove(this->position); +} + +void InsertHistoryEntry::redo(Model::EditContext &editContext) +{ + +} + +void DeleteHistoryEntry::undo(Model::EditContext &editContext) +{ + static_cast<InsertHistoryEntry*>(this)->redo(editContext); +} + +void DeleteHistoryEntry::redo(Model::EditContext &editContext) +{ + static_cast<InsertHistoryEntry*>(this)->undo(editContext); +} + +void EditHistoryEntry::undo(Model::EditContext &editContext) +{ + +} + +void EditHistoryEntry::redo(Model::EditContext &editContext) +{ + +}