PCB: fix stale ratsnest between moves in Move Individually
This commit is contained in:
parent
03f79f512c
commit
17bb57cc73
|
@ -2545,6 +2545,14 @@ int EDIT_TOOL::cutToClipboard( const TOOL_EVENT& aEvent )
|
|||
}
|
||||
|
||||
|
||||
void EDIT_TOOL::rebuildConnectivity()
|
||||
{
|
||||
board()->BuildConnectivity();
|
||||
m_toolMgr->PostEvent( EVENTS::ConnectivityChangedEvent );
|
||||
canvas()->RedrawRatsnest();
|
||||
}
|
||||
|
||||
|
||||
void EDIT_TOOL::setTransitions()
|
||||
{
|
||||
Go( &EDIT_TOOL::GetAndPlace, PCB_ACTIONS::getAndPlace.MakeEvent() );
|
||||
|
|
|
@ -200,6 +200,9 @@ private:
|
|||
bool pickReferencePoint( const wxString& aTooltip, const wxString& aSuccessMessage,
|
||||
const wxString& aCanceledMessage, VECTOR2I& aReferencePoint );
|
||||
|
||||
///< Rebuilds the ratsnest for operations that require it outside the commit rebuild
|
||||
void rebuildConnectivity();
|
||||
|
||||
private:
|
||||
PCB_SELECTION_TOOL* m_selectionTool;
|
||||
std::unique_ptr<BOARD_COMMIT> m_commit;
|
||||
|
|
|
@ -742,6 +742,8 @@ int EDIT_TOOL::doMoveSelection( const TOOL_EVENT& aEvent )
|
|||
if( isSkip )
|
||||
orig_items[itemIdx]->SetPosition( originalPos );
|
||||
|
||||
rebuildConnectivity();
|
||||
|
||||
if( ++itemIdx < orig_items.size() )
|
||||
{
|
||||
m_selectionTool->ClearSelection();
|
||||
|
|
Loading…
Reference in New Issue