ui: Fixed activation of bookmarked edge did not highlight edge

This commit is contained in:
Eberhard Graether
2017-11-03 11:44:00 +01:00
parent 5cd4378758
commit f1f4fe9a2d
3 changed files with 31 additions and 0 deletions
+18
View File
@@ -267,6 +267,7 @@ void QtGraphView::rebuildGraph(
if (m_transition && m_transition->currentTime() < m_transition->totalDuration())
{
m_transition->stop();
m_transition.reset();
finishedTransition();
}
@@ -446,6 +447,13 @@ void QtGraphView::activateEdge(Id edgeId, bool centerOrigin)
m_onQtThread(
[=]()
{
if (m_transition && m_transition->currentTime() < m_transition->totalDuration())
{
m_transition->stop();
m_transition.reset();
finishedTransition();
}
for (std::shared_ptr<QtGraphEdge>& edge : m_oldEdges)
{
edge->setIsActive(false);
@@ -498,6 +506,16 @@ void QtGraphView::finishedTransition()
QGraphicsView* view = getView();
view->setInteractive(true);
for (const std::shared_ptr<QtGraphNode>& node : m_nodes)
{
node->showNodeRecursive();
}
for (const std::shared_ptr<QtGraphEdge>& edge : m_edges)
{
edge->setOpacity(1.0f);
}
switchToNewGraphData();
}