fixed in pcbnew: abort function in track creation incompatible with new undo/redo functions
This commit is contained in:
parent
2be6520a28
commit
bd529a7cb0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue