Orig_items will have been invalidated by Revert.
Don't use it to rebuild the selection. Use the board_item flags instead. Fixes https://gitlab.com/kicad/code/kicad/issues/12882
This commit is contained in:
parent
9d525e82f5
commit
d9987e9569
|
@ -762,6 +762,7 @@ int EDIT_TOOL::doMoveSelection( const TOOL_EVENT& aEvent, bool aPickReference )
|
|||
if( restore_state )
|
||||
{
|
||||
m_commit->Revert();
|
||||
m_selectionTool->RebuildSelection();
|
||||
|
||||
// Mainly for point editor, but there might be other clients that need to adjust to
|
||||
// reverted state.
|
||||
|
@ -773,10 +774,9 @@ int EDIT_TOOL::doMoveSelection( const TOOL_EVENT& aEvent, bool aPickReference )
|
|||
else
|
||||
{
|
||||
m_commit->Push( _( "Drag" ) );
|
||||
m_toolMgr->RunAction( PCB_ACTIONS::selectItems, true, &orig_items );
|
||||
}
|
||||
|
||||
m_toolMgr->RunAction( PCB_ACTIONS::selectItems, true, &orig_items );
|
||||
|
||||
m_toolMgr->GetTool<DRAWING_TOOL>()->UpdateStatusBar();
|
||||
// Remove the dynamic ratsnest from the screen
|
||||
m_toolMgr->RunAction( PCB_ACTIONS::hideLocalRatsnest, true );
|
||||
|
|
Loading…
Reference in New Issue