logic: MessageFlushUpdates to send new Graph to GraphView when restoring Graph

This commit is contained in:
Eberhard Graether
2015-07-30 20:24:18 +02:00
parent 5f25311389
commit 165f32f6a6
7 changed files with 84 additions and 43 deletions
+14 -2
View File
@@ -420,8 +420,20 @@ void QtGraphView::createTransition()
if (!vanishingNodes.size() && !appearingNodes.size())
{
switchToNewGraphData();
return;
bool nodesMoved = false;
for (const std::pair<QtGraphNode*, QtGraphNode*>& p : remainingNodes)
{
if (p.first->getPosition() != p.second->getPosition() && p.first->getSize() != p.second->getSize())
{
nodesMoved = true;
}
}
if (!nodesMoved)
{
switchToNewGraphData();
return;
}
}
for (const std::shared_ptr<QtGraphNode>& node : m_nodes)