Clean up co-linear tracks after finishing routing

This involved adding some extra infrastructure to be able
to handle the case where a track that is sitting in the
router's commit waiting to be added to the board actually
needs to be deleted instead.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8419
This commit is contained in:
Jon Evans
2021-05-31 17:36:38 -04:00
parent 0b4075e3a9
commit 1a102f03c0
7 changed files with 125 additions and 34 deletions
+11
View File
@@ -130,6 +130,12 @@ public:
virtual COMMIT& Stage( const PICKED_ITEMS_LIST& aItems,
UNDO_REDO aModFlag = UNDO_REDO::UNSPECIFIED );
/**
* Removes an item that was previously staged to this commit from the commit.
* Use this with care:
*/
virtual COMMIT& Unstage( EDA_ITEM* aItem );
///< Execute the changes.
virtual void Push( const wxString& aMessage = wxT( "A commit" ),
bool aCreateUndoEntry = true, bool aSetDirtyBit = true ) = 0;
@@ -145,6 +151,11 @@ public:
///< Returns status of an item.
int GetStatus( EDA_ITEM* aItem );
/**
* @return a list of items added by this commit
*/
std::vector<EDA_ITEM*> GetAddedItems() const;
protected:
struct COMMIT_LINE
{