From 9807d89dfed67a883c7bbc010aa33c3c0ec7975a Mon Sep 17 00:00:00 2001 From: Quentin Quadrat Date: Tue, 14 May 2024 01:41:00 +0200 Subject: [PATCH] Do not search places in timed event graph #14 --- src/Editor/DearImGui/Editor.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Editor/DearImGui/Editor.cpp b/src/Editor/DearImGui/Editor.cpp index 40d3936..e85302b 100644 --- a/src/Editor/DearImGui/Editor.cpp +++ b/src/Editor/DearImGui/Editor.cpp @@ -919,10 +919,11 @@ bool Editor::switchOfNet(TypeOfNet const type) //------------------------------------------------------------------------------ Node* Editor::getNode(ImVec2 const& position) { - Node *n = getPlace(position); - if (n != nullptr) - return n; - return getTransition(position); + Node *node = getTransition(position); + if (m_net.type() == TypeOfNet::TimedEventGraph) + return node; + + return (node != nullptr) ? node : getPlace(position); } //------------------------------------------------------------------------------