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
@@ -151,13 +151,13 @@ void GraphController::handleMessage(MessageGraphNodeMove* message)
{
node->position += message->delta;
if (message->isFresh())
if (message->isReplayed())
{
getView()->resizeView();
buildGraph(message);
}
else
{
buildGraph(message);
getView()->resizeView();
}
}
}
@@ -1176,7 +1176,7 @@ DummyNode* GraphController::findDummyNodeAccessRecursive(
void GraphController::buildGraph(MessageBase* message)
{
if (message->undoRedoType == MessageBase::UNDOTYPE_NORMAL)
if (!message->isReplayed())
{
getView()->rebuildGraph(m_graph, m_dummyNodes, m_dummyEdges);
m_graph.reset();