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:
Wayne Stambaugh
2011-04-05 10:46:51 -04:00
parent fb47536123
commit df8f7d1ee0
34 changed files with 301 additions and 380 deletions
+2 -5
View File
@@ -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;