From 6610118582736114feced9c79e70ca35b2699028 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D1=81=D0=BB=D0=B0=D0=B2=20?= =?UTF-8?q?=D0=A1=D1=83=D1=85=D0=BE=D0=B2?= <22411953+Vladislav4KZ@users.noreply.github.com> Date: Thu, 20 Apr 2023 11:04:47 +0000 Subject: [PATCH] control: enable graph editor when opening the debug goal menu --- src/control.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/control.cpp b/src/control.cpp index 73b3a29..08f9cbb 100644 --- a/src/control.cpp +++ b/src/control.cpp @@ -1285,6 +1285,7 @@ int BotControl::menuGraphPage2 (int item) { switch (item) { case 1: + graph.setEditFlag (GraphEdit::On); showMenu (Menu::NodeDebug); break; @@ -1415,8 +1416,6 @@ int BotControl::menuGraphDebug (int item) { switch (item) { case 1: - graph.setEditFlag (GraphEdit::On); - cv_debug_goal.set (graph.getEditorNearest ()); if (cv_debug_goal.int_ () != kInvalidNodeIndex) { msg ("Debug goal is set to node %d.", cv_debug_goal.int_ ()); @@ -1428,8 +1427,6 @@ int BotControl::menuGraphDebug (int item) { break; case 2: - graph.setEditFlag (GraphEdit::On); - cv_debug_goal.set (graph.getFacingIndex ()); if (cv_debug_goal.int_ () != kInvalidNodeIndex) { msg ("Debug goal is set to node %d.", cv_debug_goal.int_ ());