logic: only show edges connected to active node

* split active and visible setting for DummyNodes
* set and check visible on DummyEdges
* include fix for Mac in MatrixDynamicBase
* fix for disappearing style and crashes in GraphView
* cleaned up DummyNode

fortune cookie message = Du stehst kurz davor etwas Neues zu unternehmen.
This commit is contained in:
Eberhard Graether
2015-02-03 16:48:32 +01:00
parent bdcca6dbad
commit 33aff14813
5 changed files with 54 additions and 83 deletions
+5 -4
View File
@@ -1,7 +1,5 @@
#include "QtGraphView.h"
#include <iostream>
#include <QBoxLayout>
#include <QFrame>
#include <QGraphicsScene>
@@ -153,8 +151,6 @@ void QtGraphView::doRebuildGraph(
node->hoverEnter();
}
}
m_graph = graph;
}
void QtGraphView::doClear()
@@ -233,6 +229,11 @@ std::shared_ptr<QtGraphNode> QtGraphView::createNodeRecursive(
std::shared_ptr<QtGraphEdge> QtGraphView::createEdge(QGraphicsView* view, const DummyEdge& edge)
{
if (!edge.visible)
{
return NULL;
}
std::shared_ptr<QtGraphNode> owner = findNodeRecursive(m_nodes, edge.ownerId);
std::shared_ptr<QtGraphNode> target = findNodeRecursive(m_nodes, edge.targetId);