Add undo/redo handling to length tuner event loop

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8129
This commit is contained in:
Jon Evans 2021-04-05 19:58:14 -04:00
parent 24cd174a23
commit e46c9d35ac
1 changed files with 8 additions and 0 deletions

View File

@ -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 );