From 949118a0304357ec3e09ffca86aa2af7caed0feb Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Thu, 20 Feb 2014 19:06:37 -0500 Subject: [PATCH] Minor coding policy fixes. --- eeschema/schedit.cpp | 2 +- eeschema/schframe.cpp | 25 ++++++------------------- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/eeschema/schedit.cpp b/eeschema/schedit.cpp index 3bfeba654b..9bcf60ed0b 100644 --- a/eeschema/schedit.cpp +++ b/eeschema/schedit.cpp @@ -701,7 +701,7 @@ static void abortMoveItem( EDA_DRAW_PANEL* aPanel, wxDC* aDC ) // Erase the wire representation before the 'normal' view is drawn. if ( item->IsWireImage() ) - item->Draw( aPanel, aDC, wxPoint( 0, 0 ), g_XorMode ); + item->Draw( aPanel, aDC, wxPoint( 0, 0 ), g_XorMode ); item->ClearFlags(); } diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index ffa575f7f8..15e021fab1 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -173,6 +173,7 @@ END_EVENT_TABLE() #define SCH_EDIT_FRAME_NAME wxT( "SchematicFrame" ) + SCH_EDIT_FRAME::SCH_EDIT_FRAME( wxWindow* aParent, const wxString& aTitle, const wxPoint& aPosition, const wxSize& aSize, long aStyle ) : @@ -534,12 +535,6 @@ double SCH_EDIT_FRAME::BestZoom() } -/* Build a filename that can be used in plot and print functions - * for the current sheet path. - * This filename is unique and must be used instead of the screen filename - * when one must creates file for each sheet in the hierarchy, - * because in complex hierarchies a sheet and a SCH_SCREEN is used more than once - */ wxString SCH_EDIT_FRAME::GetUniqueFilenameForCurrentSheet() { wxFileName fn = GetScreen()->GetFileName(); @@ -582,11 +577,6 @@ void SCH_EDIT_FRAME::OnModify() } -/***************************************************************************** -* Enable or disable menu entry and toolbar buttons according to current -* conditions. -*****************************************************************************/ - void SCH_EDIT_FRAME::OnUpdateBlockSelected( wxUpdateUIEvent& event ) { bool enable = ( GetScreen() && GetScreen()->m_BlockLocate.GetCommand() == BLOCK_MOVE ); @@ -782,9 +772,11 @@ void SCH_EDIT_FRAME::OnOpenCvpcb( wxCommandEvent& event ) } } + void SCH_EDIT_FRAME::OnOpenLibraryEditor( wxCommandEvent& event ) { SCH_COMPONENT* component = NULL; + if( event.GetId() == ID_POPUP_SCH_CALL_LIBEDIT_AND_LOAD_CMP ) { SCH_ITEM* item = GetScreen()->GetCurItem(); @@ -861,6 +853,7 @@ void SCH_EDIT_FRAME::OnPrint( wxCommandEvent& event ) } } + void SCH_EDIT_FRAME::PrintPage( wxDC* aDC, LAYER_MSK aPrintMask, bool aPrintMirrorMode, void* aData ) { @@ -975,7 +968,7 @@ void SCH_EDIT_FRAME::addCurrentItemToList( wxDC* aDC ) // Erase the wire representation before the 'normal' view is drawn. if ( item->IsWireImage() ) - item->Draw( m_canvas, aDC, wxPoint( 0, 0 ), g_XorMode ); + item->Draw( m_canvas, aDC, wxPoint( 0, 0 ), g_XorMode ); item->ClearFlags(); screen->SetModify(); @@ -993,13 +986,7 @@ void SCH_EDIT_FRAME::addCurrentItemToList( wxDC* aDC ) } } -/* sets the main window title bar text. - * If file name defined by SCH_SCREEN::m_FileName is not set, the title is set to the - * application name appended with no file. - * Otherwise, the title is set to the hierarchical sheet path and the full file name, - * and read only is appended to the title if the user does not have write - * access to the file. - */ + void SCH_EDIT_FRAME::UpdateTitle() { wxString title;