ui: Intermediate fix to avoid early QWidget deletion due to smart pointers
TODO: get rid of smart pointers for Qt classes in QtGraphView
This commit is contained in:
@@ -356,6 +356,9 @@ void QtGraphView::clear()
|
||||
m_oldActiveNode.reset();
|
||||
m_activeNodes.clear();
|
||||
|
||||
m_oldOldNodes = m_oldNodes;
|
||||
m_oldOldEdges = m_oldEdges;
|
||||
|
||||
m_nodes.clear();
|
||||
m_edges.clear();
|
||||
|
||||
@@ -777,6 +780,9 @@ void QtGraphView::switchToNewGraphData()
|
||||
edge->setParentItem(nullptr);
|
||||
}
|
||||
|
||||
m_oldOldNodes = m_oldNodes;
|
||||
m_oldOldEdges = m_oldEdges;
|
||||
|
||||
m_oldNodes = m_nodes;
|
||||
m_oldEdges = m_edges;
|
||||
|
||||
|
||||
@@ -123,9 +123,11 @@ private:
|
||||
|
||||
std::list<std::shared_ptr<QtGraphEdge>> m_edges;
|
||||
std::list<std::shared_ptr<QtGraphEdge>> m_oldEdges;
|
||||
std::list<std::shared_ptr<QtGraphEdge>> m_oldOldEdges;
|
||||
|
||||
std::list<std::shared_ptr<QtGraphNode>> m_nodes;
|
||||
std::list<std::shared_ptr<QtGraphNode>> m_oldNodes;
|
||||
std::list<std::shared_ptr<QtGraphNode>> m_oldOldNodes;
|
||||
|
||||
std::vector<std::shared_ptr<QtGraphNode>> m_activeNodes;
|
||||
std::shared_ptr<QtGraphNode> m_oldActiveNode;
|
||||
|
||||
Reference in New Issue
Block a user