Push undo/redo blocking down a level in LengthTuner tool.
This way it's active only while tuning a single line, rather than while the tool is selected. Fixes https://gitlab.com/kicad/code/kicad/issues/7462
This commit is contained in:
parent
02aca4a7d7
commit
7aa7e3fd43
|
@ -171,6 +171,7 @@ void LENGTH_TUNER_TOOL::performTuning()
|
||||||
auto placer = static_cast<PNS::MEANDER_PLACER_BASE*>( m_router->Placer() );
|
auto placer = static_cast<PNS::MEANDER_PLACER_BASE*>( m_router->Placer() );
|
||||||
|
|
||||||
placer->UpdateSettings( m_savedMeanderSettings );
|
placer->UpdateSettings( m_savedMeanderSettings );
|
||||||
|
frame()->UndoRedoBlock( true );
|
||||||
|
|
||||||
VECTOR2I end = getViewControls()->GetMousePosition();
|
VECTOR2I end = getViewControls()->GetMousePosition();
|
||||||
|
|
||||||
|
@ -252,6 +253,8 @@ void LENGTH_TUNER_TOOL::performTuning()
|
||||||
}
|
}
|
||||||
|
|
||||||
m_router->StopRouting();
|
m_router->StopRouting();
|
||||||
|
frame()->UndoRedoBlock( false );
|
||||||
|
|
||||||
controls()->SetAutoPan( false );
|
controls()->SetAutoPan( false );
|
||||||
controls()->ForceCursorPosition( false );
|
controls()->ForceCursorPosition( false );
|
||||||
frame()->GetCanvas()->SetCurrentCursor( KICURSOR::ARROW );
|
frame()->GetCanvas()->SetCurrentCursor( KICURSOR::ARROW );
|
||||||
|
@ -279,7 +282,6 @@ int LENGTH_TUNER_TOOL::MainLoop( const TOOL_EVENT& aEvent )
|
||||||
m_router->SetMode( aEvent.Parameter<PNS::ROUTER_MODE>() );
|
m_router->SetMode( aEvent.Parameter<PNS::ROUTER_MODE>() );
|
||||||
|
|
||||||
controls()->ShowCursor( true );
|
controls()->ShowCursor( true );
|
||||||
frame()->UndoRedoBlock( true );
|
|
||||||
|
|
||||||
auto setCursor =
|
auto setCursor =
|
||||||
[&]()
|
[&]()
|
||||||
|
@ -317,10 +319,12 @@ int LENGTH_TUNER_TOOL::MainLoop( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
m_menu.ShowContextMenu( selection() );
|
m_menu.ShowContextMenu( selection() );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
evt->SetPassEvent();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
frame()->UndoRedoBlock( false );
|
|
||||||
|
|
||||||
// Store routing settings till the next invocation
|
// Store routing settings till the next invocation
|
||||||
m_savedSizes = m_router->Sizes();
|
m_savedSizes = m_router->Sizes();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue