Restore selection properly after an undo.
This commit is contained in:
parent
51479c2042
commit
232e21cb37
|
@ -955,6 +955,9 @@ void EE_SELECTION_TOOL::RebuildSelection()
|
|||
EDA_ITEM::IterateForward( start, inspector, nullptr, EE_COLLECTOR::AllItems );
|
||||
|
||||
updateReferencePoint();
|
||||
|
||||
// Inform other potentially interested tools
|
||||
m_toolMgr->ProcessEvent( EVENTS::SelectedEvent );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -548,6 +548,10 @@ int LIB_EDIT_TOOL::PinTable( const TOOL_EVENT& aEvent )
|
|||
int LIB_EDIT_TOOL::Undo( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
m_frame->GetComponentFromUndoList();
|
||||
|
||||
EE_SELECTION_TOOL* selTool = m_toolMgr->GetTool<EE_SELECTION_TOOL>();
|
||||
selTool->RebuildSelection();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -555,6 +559,10 @@ int LIB_EDIT_TOOL::Undo( const TOOL_EVENT& aEvent )
|
|||
int LIB_EDIT_TOOL::Redo( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
m_frame->GetComponentFromRedoList();
|
||||
|
||||
EE_SELECTION_TOOL* selTool = m_toolMgr->GetTool<EE_SELECTION_TOOL>();
|
||||
selTool->RebuildSelection();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -725,6 +725,9 @@ int SCH_EDITOR_CONTROL::Undo( const TOOL_EVENT& aEvent )
|
|||
List->ReversePickersListOrder();
|
||||
m_frame->GetScreen()->PushCommandToRedoList( List );
|
||||
|
||||
EE_SELECTION_TOOL* selTool = m_toolMgr->GetTool<EE_SELECTION_TOOL>();
|
||||
selTool->RebuildSelection();
|
||||
|
||||
m_frame->SetSheetNumberAndCount();
|
||||
m_frame->TestDanglingEnds();
|
||||
|
||||
|
@ -754,8 +757,10 @@ int SCH_EDITOR_CONTROL::Redo( const TOOL_EVENT& aEvent )
|
|||
List->ReversePickersListOrder();
|
||||
m_frame->GetScreen()->PushCommandToUndoList( List );
|
||||
|
||||
m_frame->SetSheetNumberAndCount();
|
||||
EE_SELECTION_TOOL* selTool = m_toolMgr->GetTool<EE_SELECTION_TOOL>();
|
||||
selTool->RebuildSelection();
|
||||
|
||||
m_frame->SetSheetNumberAndCount();
|
||||
m_frame->TestDanglingEnds();
|
||||
|
||||
m_frame->SyncView();
|
||||
|
|
Loading…
Reference in New Issue