From dccc367864c02a620f063f67c32fbc855bf34628 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 4 Mar 2020 22:02:37 +0000 Subject: [PATCH] Remove code missed in the modern-toolset move. --- eeschema/sch_edit_frame.cpp | 18 ------------------ eeschema/sch_edit_frame.h | 13 ------------- eeschema/sch_field.cpp | 12 ------------ eeschema/sch_field.h | 2 -- 4 files changed, 45 deletions(-) diff --git a/eeschema/sch_edit_frame.cpp b/eeschema/sch_edit_frame.cpp index 4f4834649a..581f5c2b75 100644 --- a/eeschema/sch_edit_frame.cpp +++ b/eeschema/sch_edit_frame.cpp @@ -220,7 +220,6 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ): m_printMonochrome = true; m_printSheetReference = true; SetShowPageLimits( true ); - m_undoItem = NULL; m_hasAutoSave = true; m_showIllegalSymbolLibDialog = true; m_showSheetFileNameCaseSensitivityDlg = true; @@ -301,7 +300,6 @@ SCH_EDIT_FRAME::~SCH_EDIT_FRAME() delete g_CurrentSheet; // a SCH_SHEET_PATH, on the heap. delete g_ConnectionGraph; - delete m_undoItem; delete g_RootSheet; g_CurrentSheet = nullptr; @@ -463,18 +461,6 @@ void SCH_EDIT_FRAME::HardRedraw() } -void SCH_EDIT_FRAME::SaveUndoItemInUndoList( SCH_ITEM* aItem, bool aAppend ) -{ - wxCHECK_RET( aItem != NULL, wxT( "Cannot swap undo item structures." ) ); - wxCHECK_RET( m_undoItem != NULL, wxT( "Cannot swap undo item structures." ) ); - wxCHECK_RET( aItem->Type() == m_undoItem->Type(), wxT( "Cannot swap undo item structures." ) ); - - aItem->SwapData( m_undoItem ); - SaveCopyInUndoList( aItem, UR_CHANGED, aAppend ); - aItem->SwapData( m_undoItem ); -} - - void SCH_EDIT_FRAME::OnCloseWindow( wxCloseEvent& aEvent ) { SCH_SHEET_LIST sheetList( g_RootSheet ); @@ -1003,10 +989,6 @@ void SCH_EDIT_FRAME::AddItemToScreenAndUndoList( SCH_ITEM* aItem, bool aUndoAppe if( !aItem->IsMoving() ) RecalculateConnections( LOCAL_CLEANUP ); } - else - { - SaveUndoItemInUndoList( undoItem, aUndoAppend ); - } aItem->ClearFlags( IS_NEW ); diff --git a/eeschema/sch_edit_frame.h b/eeschema/sch_edit_frame.h index 13dff10aa2..bf3c41347a 100644 --- a/eeschema/sch_edit_frame.h +++ b/eeschema/sch_edit_frame.h @@ -131,7 +131,6 @@ private: bool m_printSheetReference; SCH_ITEM* m_item_to_repeat; ///< Last item to insert by the repeat command. int m_repeatLabelDelta; ///< Repeat label number increment step. - SCH_ITEM* m_undoItem; ///< Copy of the current item being edited. wxString m_netListerCommand; ///< Command line to call a custom net list ///< generator. int m_exec_flags; ///< Flags of the wxExecute() function @@ -956,18 +955,6 @@ public: */ SCH_ITEM* GetRepeatItem() const { return m_item_to_repeat; } - /** - * Swap the cloned item in member variable m_undoItem with \a aItem and saves it to - * the undo list then swap the data back. - * - * This swaps the internal structure of the item with the cloned item. It does not - * swap the actual item pointers themselves. - * - * @param aItem The item to swap with the current undo item. - * @param aAppend True if the action should be appended to the current undo record. - */ - void SaveUndoItemInUndoList( SCH_ITEM* aItem, bool aAppend = false ); - /** * Performs an undo of the last edit WITHOUT logging a corresponding redo. Used to cancel * an in-progress operation. diff --git a/eeschema/sch_field.cpp b/eeschema/sch_field.cpp index ee2fadfdec..7dcfc9a0ae 100644 --- a/eeschema/sch_field.cpp +++ b/eeschema/sch_field.cpp @@ -261,18 +261,6 @@ bool SCH_FIELD::IsVoid() const } -void SCH_FIELD::Place( SCH_EDIT_FRAME* frame, wxDC* DC ) -{ - SCH_COMPONENT* component = (SCH_COMPONENT*) GetParent(); - - // save old cmp in undo list - frame->SaveUndoItemInUndoList( component ); - - ClearEditFlags(); - frame->OnModify(); -} - - bool SCH_FIELD::Matches( wxFindReplaceData& aSearchData, void* aAuxData ) { wxString text = GetFullyQualifiedText(); diff --git a/eeschema/sch_field.h b/eeschema/sch_field.h index 66781f8bee..7d3c87a47f 100644 --- a/eeschema/sch_field.h +++ b/eeschema/sch_field.h @@ -119,8 +119,6 @@ public: */ const wxString GetFullyQualifiedText() const; - void Place( SCH_EDIT_FRAME* frame, wxDC* DC ); - const EDA_RECT GetBoundingBox() const override; /**