Commit bd529a7c authored by charras's avatar charras

fixed in pcbnew: abort function in track creation incompatible with new undo/redo functions

parent 2be6520a
......@@ -161,8 +161,10 @@ public:
* Put data pointed by List in the previous state, i.e. the state memorised by List
* @param aList = a PICKED_ITEMS_LIST pointer to the list of items to undo/redo
* @param aRedoCommand = a bool: true for redo, false for undo
* @param aRebuildRatsnet = a bool: true to rebuid ratsnet (normal use), false
* to just retrieve las state (used in abort commands that do not need to rebuild ratsnest)
*/
void PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRedoCommand );
void PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRedoCommand, bool aRebuildRatsnet = true );
/** Function GetBoardFromRedoList
* Redo the last edition:
* - Save the current board in Undo list
......
......@@ -463,8 +463,10 @@ void WinEDA_PcbFrame::SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
* Put data pointed by List in the previous state, i.e. the state memorised by List
* @param aList = a PICKED_ITEMS_LIST pointer to the list of items to undo/redo
* @param aRedoCommand = a bool: true for redo, false for undo
* @param aRebuildRatsnet = a bool: true to rebuid ratsnet (normal use, and default), false
* to just retrieve las state (used in abort commands that do not need to rebuild ratsnest)
*/
void WinEDA_PcbFrame::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRedoCommand )
void WinEDA_PcbFrame::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRedoCommand, bool aRebuildRatsnet )
{
BOARD_ITEM* item;
bool not_found = false;
......@@ -557,7 +559,7 @@ void WinEDA_PcbFrame::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRe
wxMessageBox( wxT( "Incomplete undo/redo operation: some items not found" ) );
// Rebuild pointers and rastnest that can be changed.
if( reBuild_ratsnest )
if( reBuild_ratsnest && aRebuildRatsnet )
Compile_Ratsnest( NULL, true );
}
......
......@@ -54,7 +54,8 @@ static void Exit_Editrack( WinEDA_DrawPanel* Panel, wxDC* DC )
frame->MsgPanel->EraseMsgBox();
// Clear the undo picker list:
// Undo pending changes (mainly a lock point cretion) and clear the undo picker list:
frame->PutDataInPreviousState(&s_ItemsListPicker, false, false);
s_ItemsListPicker.ClearListAndDeleteItems();
// Delete current (new) track
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment