ui: Fixed animation crash

* Fixed crash that occurred when resetting the current animation in the QtGraphView.
This commit is contained in:
malte_langkabel
2015-06-23 16:36:39 +02:00
parent a527a3c34d
commit 3587b487dd
+1 -3
View File
@@ -115,8 +115,6 @@ void QtGraphView::finishedTransition()
view->setInteractive(true);
switchToNewGraphData();
m_transition.reset();
}
void QtGraphView::switchToNewGraphData()
@@ -174,7 +172,7 @@ void QtGraphView::doRebuildGraph(
const std::vector<DummyNode>& nodes,
const std::vector<DummyEdge>& edges
){
if (m_transition)
if (m_transition && m_transition->currentTime() < m_transition->totalDuration())
{
m_transition->stop();
switchToNewGraphData();