From 1ba1b9f9670718d298d50326050d3f504e8f053d Mon Sep 17 00:00:00 2001 From: Eberhard Graether Date: Fri, 24 Aug 2018 13:54:53 +0200 Subject: [PATCH] ui: Clear graph contents on overview (issue #609) --- src/lib/component/controller/GraphController.cpp | 5 +---- src/lib_gui/qt/view/QtGraphView.cpp | 3 ++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/lib/component/controller/GraphController.cpp b/src/lib/component/controller/GraphController.cpp index 31911678..ad4a09f6 100644 --- a/src/lib/component/controller/GraphController.cpp +++ b/src/lib/component/controller/GraphController.cpp @@ -36,10 +36,7 @@ void GraphController::handleMessage(MessageActivateAll* message) { TRACE("graph all"); - m_activeNodeIds.clear(); - m_activeEdgeIds.clear(); - - m_dummyGraphNodes.clear(); + clear(); if (message->acceptedNodeTypes != NodeTypeSet::all()) { diff --git a/src/lib_gui/qt/view/QtGraphView.cpp b/src/lib_gui/qt/view/QtGraphView.cpp index 5c65629a..038a2f6e 100644 --- a/src/lib_gui/qt/view/QtGraphView.cpp +++ b/src/lib_gui/qt/view/QtGraphView.cpp @@ -422,8 +422,9 @@ void QtGraphView::clear() m_oldGraph.reset(); m_matchedNodes.clear(); - }); + getView()->scene()->clear(); + }); } void QtGraphView::focusTokenIds(const std::vector& focusedTokenIds)