Remove EDIT_TOOL's quasi-global BOARD_COMMIT.
It had several encapsulation leakage issues, as well as poorly-defined behaviour of undo for chained-actions (append-to-board, and then rotate while moving, for instance).
This commit is contained in:
@@ -571,6 +571,8 @@ void BOARD_COMMIT::Push( const wxString& aMessage, int aCommitFlags )
|
||||
wxASSERT( false );
|
||||
break;
|
||||
}
|
||||
|
||||
boardItem->ClearEditFlags();
|
||||
}
|
||||
|
||||
if( bulkAddedItems.size() > 0 )
|
||||
@@ -767,6 +769,8 @@ void BOARD_COMMIT::Revert()
|
||||
wxASSERT( false );
|
||||
break;
|
||||
}
|
||||
|
||||
item->ClearEditFlags();
|
||||
}
|
||||
|
||||
if( bulkAddedItems.size() > 0 )
|
||||
@@ -787,6 +791,9 @@ void BOARD_COMMIT::Revert()
|
||||
PCB_SELECTION_TOOL* selTool = m_toolMgr->GetTool<PCB_SELECTION_TOOL>();
|
||||
selTool->RebuildSelection();
|
||||
|
||||
// Property panel needs to know about the reselect
|
||||
m_toolMgr->PostEvent( EVENTS::SelectedItemsModified );
|
||||
|
||||
clear();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user