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:
Jeff Young 2022-11-11 22:57:03 +00:00
parent 9d525e82f5
commit d9987e9569
1 changed files with 2 additions and 2 deletions

View File

@ -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,9 +774,8 @@ 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->GetTool<DRAWING_TOOL>()->UpdateStatusBar();
// Remove the dynamic ratsnest from the screen