Loading common/zoom.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -219,7 +219,6 @@ void WinEDA_DrawPanel::AddMenuZoom( wxMenu* MasterMenu ) maxZoomIds = ID_POPUP_ZOOM_LEVEL_END - ID_POPUP_ZOOM_LEVEL_START; maxZoomIds = ( (size_t) maxZoomIds < GetScreen()->m_ZoomList.GetCount() ) ? maxZoomIds : GetScreen()->m_ZoomList.GetCount(); wxLogDebug( _T( "%d zoom IDs used." ), maxZoomIds ); /* Populate zoom submenu. */ for( i = 0; i < (size_t) maxZoomIds; i++ ) Loading cvpcb/cvstruct.h +13 −0 Original line number Diff line number Diff line Loading @@ -229,6 +229,19 @@ public: { } /** Function SaveCopyInUndoList (overloaded). * Creates a new entry in undo list of commands. * add a list of pickers to handle a list of items * @param aItemsList = the list of items modified by the command to undo * @param aTypeCommand = command type (see enum UndoRedoOpType) * @param aTransformPoint = the reference point of the transformation, for commands like move */ virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList, UndoRedoOpType aTypeCommand, const wxPoint& aTransformPoint = wxPoint(0,0) ) { // currently: do nothing in cvpcb. } DECLARE_EVENT_TABLE() }; Loading eeschema/libedit_undo_redo.cpp +4 −14 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ void WinEDA_LibeditFrame::SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy, CopyItem = CopyLibEntryStruct( this, (EDA_LibComponentStruct*) ItemToCopy ); lastcmd = new PICKED_ITEMS_LIST(); ITEM_PICKER wrapper(CopyItem); ITEM_PICKER wrapper(CopyItem, UR_LIBEDIT); lastcmd->PushItem(wrapper); GetScreen()->PushCommandToUndoList( lastcmd ); /* Clear current flags (which can be temporary set by a current edit command) */ Loading @@ -34,17 +34,7 @@ void WinEDA_LibeditFrame::SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy, item->m_Flags = 0; /* Clear redo list, because after new save there is no redo to do */ while( (lastcmd = GetScreen()->PopCommandFromRedoList( ) ) != NULL ) { while ( 1 ) { wrapper = lastcmd->PopItem(); if ( wrapper.m_PickedItem == NULL ) break; // All items are removed delete wrapper.m_PickedItem; } delete lastcmd; } GetScreen()->ClearUndoORRedoList( GetScreen()->m_RedoList ); } Loading @@ -62,7 +52,7 @@ void WinEDA_LibeditFrame::GetComponentFromRedoList(wxCommandEvent& event) return; PICKED_ITEMS_LIST* lastcmd = new PICKED_ITEMS_LIST(); ITEM_PICKER wrapper(CurrentLibEntry); ITEM_PICKER wrapper(CurrentLibEntry, UR_LIBEDIT); lastcmd->PushItem(wrapper); GetScreen()->PushCommandToUndoList( lastcmd ); Loading Loading @@ -95,7 +85,7 @@ void WinEDA_LibeditFrame::GetComponentFromUndoList(wxCommandEvent& event) return; PICKED_ITEMS_LIST* lastcmd = new PICKED_ITEMS_LIST(); ITEM_PICKER wrapper(CurrentLibEntry); ITEM_PICKER wrapper(CurrentLibEntry, UR_LIBEDIT); lastcmd->PushItem(wrapper); GetScreen()->PushCommandToRedoList( lastcmd ); Loading eeschema/schematic_undo_redo.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -509,6 +509,10 @@ void SCH_SCREEN::ClearUndoORRedoList( UNDO_REDO_CONTAINER& aList, int aItemCount case UR_NEW: // Do nothing, items are in use break; case UR_LIBEDIT: // Libedit save always a copy of the current item delete item; // So, the picker is always owner of the picked item break; case UR_DELETED: delete item; // Delete the picked item, because it was deleted from schematic break; Loading gerbview/wxGerberFrame.h +12 −0 Original line number Diff line number Diff line Loading @@ -175,6 +175,18 @@ public: const wxPoint& aTransformPoint = wxPoint(0,0) ) { } /** Function SaveCopyInUndoList (overloaded). * Creates a new entry in undo list of commands. * add a list of pickers to handle a list of items * @param aItemsList = the list of items modified by the command to undo * @param aTypeCommand = command type (see enum UndoRedoOpType) * @param aTransformPoint = the reference point of the transformation, for commands like move */ virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList, UndoRedoOpType aTypeCommand, const wxPoint& aTransformPoint = wxPoint(0,0) ) { // currently: do nothing in gerbview. } DECLARE_EVENT_TABLE() Loading Loading
common/zoom.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -219,7 +219,6 @@ void WinEDA_DrawPanel::AddMenuZoom( wxMenu* MasterMenu ) maxZoomIds = ID_POPUP_ZOOM_LEVEL_END - ID_POPUP_ZOOM_LEVEL_START; maxZoomIds = ( (size_t) maxZoomIds < GetScreen()->m_ZoomList.GetCount() ) ? maxZoomIds : GetScreen()->m_ZoomList.GetCount(); wxLogDebug( _T( "%d zoom IDs used." ), maxZoomIds ); /* Populate zoom submenu. */ for( i = 0; i < (size_t) maxZoomIds; i++ ) Loading
cvpcb/cvstruct.h +13 −0 Original line number Diff line number Diff line Loading @@ -229,6 +229,19 @@ public: { } /** Function SaveCopyInUndoList (overloaded). * Creates a new entry in undo list of commands. * add a list of pickers to handle a list of items * @param aItemsList = the list of items modified by the command to undo * @param aTypeCommand = command type (see enum UndoRedoOpType) * @param aTransformPoint = the reference point of the transformation, for commands like move */ virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList, UndoRedoOpType aTypeCommand, const wxPoint& aTransformPoint = wxPoint(0,0) ) { // currently: do nothing in cvpcb. } DECLARE_EVENT_TABLE() }; Loading
eeschema/libedit_undo_redo.cpp +4 −14 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ void WinEDA_LibeditFrame::SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy, CopyItem = CopyLibEntryStruct( this, (EDA_LibComponentStruct*) ItemToCopy ); lastcmd = new PICKED_ITEMS_LIST(); ITEM_PICKER wrapper(CopyItem); ITEM_PICKER wrapper(CopyItem, UR_LIBEDIT); lastcmd->PushItem(wrapper); GetScreen()->PushCommandToUndoList( lastcmd ); /* Clear current flags (which can be temporary set by a current edit command) */ Loading @@ -34,17 +34,7 @@ void WinEDA_LibeditFrame::SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy, item->m_Flags = 0; /* Clear redo list, because after new save there is no redo to do */ while( (lastcmd = GetScreen()->PopCommandFromRedoList( ) ) != NULL ) { while ( 1 ) { wrapper = lastcmd->PopItem(); if ( wrapper.m_PickedItem == NULL ) break; // All items are removed delete wrapper.m_PickedItem; } delete lastcmd; } GetScreen()->ClearUndoORRedoList( GetScreen()->m_RedoList ); } Loading @@ -62,7 +52,7 @@ void WinEDA_LibeditFrame::GetComponentFromRedoList(wxCommandEvent& event) return; PICKED_ITEMS_LIST* lastcmd = new PICKED_ITEMS_LIST(); ITEM_PICKER wrapper(CurrentLibEntry); ITEM_PICKER wrapper(CurrentLibEntry, UR_LIBEDIT); lastcmd->PushItem(wrapper); GetScreen()->PushCommandToUndoList( lastcmd ); Loading Loading @@ -95,7 +85,7 @@ void WinEDA_LibeditFrame::GetComponentFromUndoList(wxCommandEvent& event) return; PICKED_ITEMS_LIST* lastcmd = new PICKED_ITEMS_LIST(); ITEM_PICKER wrapper(CurrentLibEntry); ITEM_PICKER wrapper(CurrentLibEntry, UR_LIBEDIT); lastcmd->PushItem(wrapper); GetScreen()->PushCommandToRedoList( lastcmd ); Loading
eeschema/schematic_undo_redo.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -509,6 +509,10 @@ void SCH_SCREEN::ClearUndoORRedoList( UNDO_REDO_CONTAINER& aList, int aItemCount case UR_NEW: // Do nothing, items are in use break; case UR_LIBEDIT: // Libedit save always a copy of the current item delete item; // So, the picker is always owner of the picked item break; case UR_DELETED: delete item; // Delete the picked item, because it was deleted from schematic break; Loading
gerbview/wxGerberFrame.h +12 −0 Original line number Diff line number Diff line Loading @@ -175,6 +175,18 @@ public: const wxPoint& aTransformPoint = wxPoint(0,0) ) { } /** Function SaveCopyInUndoList (overloaded). * Creates a new entry in undo list of commands. * add a list of pickers to handle a list of items * @param aItemsList = the list of items modified by the command to undo * @param aTypeCommand = command type (see enum UndoRedoOpType) * @param aTransformPoint = the reference point of the transformation, for commands like move */ virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList, UndoRedoOpType aTypeCommand, const wxPoint& aTransformPoint = wxPoint(0,0) ) { // currently: do nothing in gerbview. } DECLARE_EVENT_TABLE() Loading