From e46c9d35ac3cd500b7c84bb81646ffb0887807d4 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Mon, 5 Apr 2021 19:58:14 -0400 Subject: [PATCH] Add undo/redo handling to length tuner event loop Fixes https://gitlab.com/kicad/code/kicad/-/issues/8129 --- pcbnew/router/length_tuner_tool.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pcbnew/router/length_tuner_tool.cpp b/pcbnew/router/length_tuner_tool.cpp index b3f54feb9e..dd9707454f 100644 --- a/pcbnew/router/length_tuner_tool.cpp +++ b/pcbnew/router/length_tuner_tool.cpp @@ -292,6 +292,14 @@ int LENGTH_TUNER_TOOL::MainLoop( const TOOL_EVENT& aEvent ) { break; // Finish } + else if( evt->Action() == TA_UNDO_REDO_PRE ) + { + m_router->ClearWorld(); + } + else if( evt->Action() == TA_UNDO_REDO_POST || evt->Action() == TA_MODEL_CHANGE ) + { + m_router->SyncWorld(); + } else if( evt->IsMotion() ) { updateStartItem( *evt );