From 40248697716c92d7fff0cf7c7e52d79fd413763f Mon Sep 17 00:00:00 2001
From: Alex Shvartzkop <dudesuchamazing@gmail.com>
Date: Thu, 13 Feb 2025 14:21:42 +0300
Subject: [PATCH] Don't exit out of length tuning tool on first cancel.

Otherwise you cannot use same settings on multiple tracks.

(cherry picked from commit 6b31bbe9f3bda8f229d3f7d48af522395cef30ae)
---
 pcbnew/generators/pcb_tuning_pattern.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/pcbnew/generators/pcb_tuning_pattern.cpp b/pcbnew/generators/pcb_tuning_pattern.cpp
index 5ef958c462..87b04d5c25 100644
--- a/pcbnew/generators/pcb_tuning_pattern.cpp
+++ b/pcbnew/generators/pcb_tuning_pattern.cpp
@@ -2376,8 +2376,10 @@ int DRAWING_TOOL::PlaceTuningPattern( const TOOL_EVENT& aEvent )
                 delete m_tuningPattern;
                 m_tuningPattern = nullptr;
             }
-
-            break;
+            else
+            {
+                break;
+            }
         }
         else if( evt->IsMotion() )
         {