From a0d3bd272cb2c2be84552205204f51253e37f835 Mon Sep 17 00:00:00 2001 From: Eberhard Graether Date: Wed, 22 Feb 2017 04:58:54 +0100 Subject: [PATCH] ui: Fixed scrolling to active symbol when clicking on active graph view node --- bin/test/data/log/test_log.txt | 1 - src/lib/component/controller/CodeController.cpp | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/test/data/log/test_log.txt b/bin/test/data/log/test_log.txt index 079df710..e1103410 100644 --- a/bin/test/data/log/test_log.txt +++ b/bin/test/data/log/test_log.txt @@ -1,4 +1,3 @@ -Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml Token.cpp ERROR: Location Id was not referenced by this Token. Node.cpp WARNING: Cannot change NodeType after it was already set from namespace to class Edge.cpp ERROR: Nodes are not plain copies. diff --git a/src/lib/component/controller/CodeController.cpp b/src/lib/component/controller/CodeController.cpp index ea52bb51..c43c808c 100644 --- a/src/lib/component/controller/CodeController.cpp +++ b/src/lib/component/controller/CodeController.cpp @@ -130,6 +130,11 @@ void CodeController::handleMessage(MessageActivateTokens* message) else if (message->keepContent()) { view->showActiveTokenIds(activeTokenIds); + if (m_scrollToDefinition) + { + getView()->scrollToDefinition(true); + m_scrollToDefinition = false; + } } else { @@ -262,7 +267,7 @@ void CodeController::handleMessage(MessageDeactivateEdge* message) { if (message->scrollToDefinition) { - getView()->scrollToDefinition(true); + m_scrollToDefinition = true; } }