EESchema remove global variable and fix text object change type undo/redo.
* Move undo item copy global variable into schematic editor frame object member variable. * Add helper methods for accessing the undo item copy member variable. * Fix undetected bug when changing a text type. * Added an exchange command to the undo/redo base class for handling undoing a changed item type which cannot be undone by swapping out the variables. * Revert change to common/hotkeys_basic.cpp that broke hot key behavior. * Lots of coding policy changes while making the changes above.
This commit is contained in:
@@ -86,12 +86,9 @@ void SCH_EDIT_FRAME::StartMoveBusEntry( SCH_BUS_ENTRY* BusEntry, wxDC* DC )
|
||||
return;
|
||||
|
||||
if( !BusEntry->IsNew() ) // not already in edit, save shape
|
||||
{
|
||||
delete g_ItemToUndoCopy;
|
||||
g_ItemToUndoCopy = BusEntry->Clone();
|
||||
}
|
||||
SetUndoItem( BusEntry );
|
||||
|
||||
BusEntry->m_Flags |= IS_MOVED;
|
||||
BusEntry->SetFlags( IS_MOVED );
|
||||
|
||||
ItemInitialPosition = BusEntry->m_Pos;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user