logic: correctly undoing graph interactions by replaying actions since last active token change

This change introdoces a classification of commands by order in the undo stack. Undoing the last action will resend the
message of the last active token change and all messages changing the ui after that.
This commit is contained in:
Eberhard Graether
2015-06-24 01:15:31 +02:00
parent 3587b487dd
commit 7275082284
20 changed files with 262 additions and 95 deletions
+3 -2
View File
@@ -3,7 +3,7 @@
#include <memory>
#include <mutex>
#include <queue>
#include <deque>
#include "utility/messaging/MessageListener.h"
#include "utility/messaging/type/MessageInterruptTasks.h"
@@ -16,6 +16,7 @@ public:
static std::shared_ptr<TaskScheduler> getInstance();
void pushTask(std::shared_ptr<Task> task);
void pushNextTask(std::shared_ptr<Task> task);
void interruptCurrentTask();
void startSchedulerLoopThreaded();
@@ -39,7 +40,7 @@ private:
bool m_loopIsRunning;
bool m_threadIsRunning;
std::queue<std::shared_ptr<Task>> m_tasks;
std::deque<std::shared_ptr<Task>> m_tasks;
bool m_interruptTask;
mutable std::mutex m_tasksMutex;