logic: rewrote UndoRedoController to differentiate 3 types of priority

ORDER_ACTIVATE for messages that change active symbols
ORDER_ADAPT for graph and code view expanding and collapsing
ORDER_VIEW for scrolling and local symbol activation
This commit is contained in:
Eberhard Graether
2016-04-18 22:38:20 +02:00
parent c7940eb34f
commit a57f24b2b2
9 changed files with 244 additions and 230 deletions
+9 -13
View File
@@ -7,16 +7,8 @@
class MessageBase
{
public:
enum UndoType
{
UNDOTYPE_NORMAL,
UNDOTYPE_REDO,
UNDOTYPE_UNDO,
UNDOTYPE_IGNORE
};
MessageBase()
: undoRedoType(UNDOTYPE_NORMAL)
: m_isReplayed(false)
, m_sendAsTask(true)
, m_keepContent(false)
, m_cancelled(false)
@@ -42,9 +34,14 @@ public:
m_sendAsTask = sendAsTask;
}
bool isFresh() const
bool isReplayed() const
{
return (undoRedoType == UNDOTYPE_NORMAL);
return m_isReplayed;
}
void setIsReplayed(bool isReplayed)
{
m_isReplayed = isReplayed;
}
bool isLast() const
@@ -97,9 +94,8 @@ public:
return ss.str();
}
UndoType undoRedoType;
private:
bool m_isReplayed;
bool m_sendAsTask;
bool m_keepContent;
bool m_cancelled;