From a9c8a7b69c158a67499ac3def47b312890abc9b6 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 21 Aug 2018 20:41:42 +0100 Subject: [PATCH] Remove unused warp mouse parameter. --- eeschema/cross-probing.cpp | 10 ++-- .../dialogs/dialog_fields_editor_global.cpp | 2 +- eeschema/find.cpp | 53 ++++--------------- eeschema/sch_edit_frame.h | 4 +- 4 files changed, 17 insertions(+), 52 deletions(-) diff --git a/eeschema/cross-probing.cpp b/eeschema/cross-probing.cpp index ce8148b1f5..54c2a14f40 100644 --- a/eeschema/cross-probing.cpp +++ b/eeschema/cross-probing.cpp @@ -100,7 +100,7 @@ void SCH_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline ) if( idcmd == NULL ) // component only { - FindComponentAndItem( part_ref, true, FIND_COMPONENT_ONLY, wxEmptyString, false ); + FindComponentAndItem( part_ref, true, FIND_COMPONENT_ONLY, wxEmptyString ); return; } @@ -113,19 +113,19 @@ void SCH_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline ) if( strcmp( idcmd, "$REF:" ) == 0 ) { - FindComponentAndItem( part_ref, true, FIND_REFERENCE, msg, false ); + FindComponentAndItem( part_ref, true, FIND_REFERENCE, msg ); } else if( strcmp( idcmd, "$VAL:" ) == 0 ) { - FindComponentAndItem( part_ref, true, FIND_VALUE, msg, false ); + FindComponentAndItem( part_ref, true, FIND_VALUE, msg ); } else if( strcmp( idcmd, "$PAD:" ) == 0 ) { - FindComponentAndItem( part_ref, true, FIND_PIN, msg, false ); + FindComponentAndItem( part_ref, true, FIND_PIN, msg ); } else { - FindComponentAndItem( part_ref, true, FIND_COMPONENT_ONLY, wxEmptyString, false ); + FindComponentAndItem( part_ref, true, FIND_COMPONENT_ONLY, wxEmptyString ); } } diff --git a/eeschema/dialogs/dialog_fields_editor_global.cpp b/eeschema/dialogs/dialog_fields_editor_global.cpp index 2cb33700f3..a7dc28e812 100644 --- a/eeschema/dialogs/dialog_fields_editor_global.cpp +++ b/eeschema/dialogs/dialog_fields_editor_global.cpp @@ -926,7 +926,7 @@ void DIALOG_FIELDS_EDITOR_GLOBAL::OnTableCellClick( wxGridEvent& event ) if( refs.size() == 1 ) { m_parent->FindComponentAndItem( refs[0].GetRef() + refs[0].GetRefNumber(), - true, FIND_COMPONENT_ONLY, wxEmptyString, false ); + true, FIND_COMPONENT_ONLY, wxEmptyString ); } } else diff --git a/eeschema/find.cpp b/eeschema/find.cpp index 4836ccf039..35b6a8b09f 100644 --- a/eeschema/find.cpp +++ b/eeschema/find.cpp @@ -108,8 +108,7 @@ void SCH_EDIT_FRAME::OnFindDrcMarker( wxFindDialogEvent& event ) SCH_ITEM* SCH_EDIT_FRAME::FindComponentAndItem( const wxString& aReference, bool aSearchHierarchy, SCH_SEARCH_T aSearchType, - const wxString& aSearchText, - bool aWarpMouse ) + const wxString& aSearchText ) { SCH_SHEET_PATH* sheet = NULL; SCH_SHEET_PATH* sheetWithComponentFound = NULL; @@ -205,32 +204,23 @@ SCH_ITEM* SCH_EDIT_FRAME::FindComponentAndItem( const wxString& aReference, /* There may be need to reframe the drawing */ if( ! m_canvas->IsPointOnDisplay( pos ) ) - { centerAndRedraw = true; - } if( centerAndRedraw ) { SetCrossHairPosition( pos ); - RedrawScreen( pos, aWarpMouse ); + RedrawScreen( pos, false ); } - else { INSTALL_UNBUFFERED_DC( dc, m_canvas ); m_canvas->CrossHairOff( &dc ); - - if( aWarpMouse ) - m_canvas->MoveCursor( pos ); - SetCrossHairPosition( pos ); - m_canvas->CrossHairOn( &dc ); } } - /* Print diag */ wxString msg_item; wxString msg; @@ -238,45 +228,22 @@ SCH_ITEM* SCH_EDIT_FRAME::FindComponentAndItem( const wxString& aReference, switch( aSearchType ) { default: - case FIND_COMPONENT_ONLY: // Find component only - msg_item = _( "component" ); - break; - - case FIND_PIN: // find a pin - msg_item.Printf( _( "pin %s" ), GetChars( aSearchText ) ); - break; - - case FIND_REFERENCE: // find reference - msg_item.Printf( _( "reference %s" ), GetChars( aSearchText ) ); - break; - - case FIND_VALUE: // find value - msg_item.Printf( _( "value %s" ), GetChars( aSearchText ) ); - break; - - case FIND_FIELD: // find field. todo - msg_item.Printf( _( "field %s" ), GetChars( aSearchText ) ); - break; + case FIND_COMPONENT_ONLY: msg_item = _( "component" ); break; + case FIND_PIN: msg_item.Printf( _( "pin %s" ), aSearchText ); break; + case FIND_REFERENCE: msg_item.Printf( _( "reference %s" ), aSearchText ); break; + case FIND_VALUE: msg_item.Printf( _( "value %s" ), aSearchText ); break; + case FIND_FIELD: msg_item.Printf( _( "field %s" ), aSearchText ); break; } if( Component ) { if( !notFound ) - { - msg.Printf( _( "%s %s found" ), - GetChars( aReference ), GetChars( msg_item ) ); - } + msg.Printf( _( "%s %s found" ), aReference, msg_item ); else - { - msg.Printf( _( "%s found but %s not found" ), - GetChars( aReference ), GetChars( msg_item ) ); - } + msg.Printf( _( "%s found but %s not found" ), aReference, msg_item ); } else - { - msg.Printf( _( "Component %s not found" ), - GetChars( aReference ) ); - } + msg.Printf( _( "Component %s not found" ), aReference ); SetStatusText( msg ); diff --git a/eeschema/sch_edit_frame.h b/eeschema/sch_edit_frame.h index ec440ad35f..c4beba3d61 100644 --- a/eeschema/sch_edit_frame.h +++ b/eeschema/sch_edit_frame.h @@ -449,13 +449,11 @@ public: * the entire hierarchy * @param aSearchType A #SCH_SEARCH_T value used to determine what to search for. * @param aSearchText The text to search for, either in value, reference or elsewhere. - * @param aWarpMouse If true, then move the mouse cursor to the item. */ SCH_ITEM* FindComponentAndItem( const wxString& aReference, bool aSearchHierarchy, SCH_SEARCH_T aSearchType, - const wxString& aSearchText, - bool aWarpMouse ); + const wxString& aSearchText ); /** * Breaks a single segment into two at the specified point