Remove unused warp mouse parameter.

This commit is contained in:
Jeff Young 2018-08-21 20:41:42 +01:00
parent e632816562
commit a9c8a7b69c
4 changed files with 17 additions and 52 deletions

View File

@ -100,7 +100,7 @@ void SCH_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline )
if( idcmd == NULL ) // component only if( idcmd == NULL ) // component only
{ {
FindComponentAndItem( part_ref, true, FIND_COMPONENT_ONLY, wxEmptyString, false ); FindComponentAndItem( part_ref, true, FIND_COMPONENT_ONLY, wxEmptyString );
return; return;
} }
@ -113,19 +113,19 @@ void SCH_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline )
if( strcmp( idcmd, "$REF:" ) == 0 ) 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 ) 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 ) else if( strcmp( idcmd, "$PAD:" ) == 0 )
{ {
FindComponentAndItem( part_ref, true, FIND_PIN, msg, false ); FindComponentAndItem( part_ref, true, FIND_PIN, msg );
} }
else else
{ {
FindComponentAndItem( part_ref, true, FIND_COMPONENT_ONLY, wxEmptyString, false ); FindComponentAndItem( part_ref, true, FIND_COMPONENT_ONLY, wxEmptyString );
} }
} }

View File

@ -926,7 +926,7 @@ void DIALOG_FIELDS_EDITOR_GLOBAL::OnTableCellClick( wxGridEvent& event )
if( refs.size() == 1 ) if( refs.size() == 1 )
{ {
m_parent->FindComponentAndItem( refs[0].GetRef() + refs[0].GetRefNumber(), m_parent->FindComponentAndItem( refs[0].GetRef() + refs[0].GetRefNumber(),
true, FIND_COMPONENT_ONLY, wxEmptyString, false ); true, FIND_COMPONENT_ONLY, wxEmptyString );
} }
} }
else else

View File

@ -108,8 +108,7 @@ void SCH_EDIT_FRAME::OnFindDrcMarker( wxFindDialogEvent& event )
SCH_ITEM* SCH_EDIT_FRAME::FindComponentAndItem( const wxString& aReference, SCH_ITEM* SCH_EDIT_FRAME::FindComponentAndItem( const wxString& aReference,
bool aSearchHierarchy, bool aSearchHierarchy,
SCH_SEARCH_T aSearchType, SCH_SEARCH_T aSearchType,
const wxString& aSearchText, const wxString& aSearchText )
bool aWarpMouse )
{ {
SCH_SHEET_PATH* sheet = NULL; SCH_SHEET_PATH* sheet = NULL;
SCH_SHEET_PATH* sheetWithComponentFound = 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 */ /* There may be need to reframe the drawing */
if( ! m_canvas->IsPointOnDisplay( pos ) ) if( ! m_canvas->IsPointOnDisplay( pos ) )
{
centerAndRedraw = true; centerAndRedraw = true;
}
if( centerAndRedraw ) if( centerAndRedraw )
{ {
SetCrossHairPosition( pos ); SetCrossHairPosition( pos );
RedrawScreen( pos, aWarpMouse ); RedrawScreen( pos, false );
} }
else else
{ {
INSTALL_UNBUFFERED_DC( dc, m_canvas ); INSTALL_UNBUFFERED_DC( dc, m_canvas );
m_canvas->CrossHairOff( &dc ); m_canvas->CrossHairOff( &dc );
if( aWarpMouse )
m_canvas->MoveCursor( pos );
SetCrossHairPosition( pos ); SetCrossHairPosition( pos );
m_canvas->CrossHairOn( &dc ); m_canvas->CrossHairOn( &dc );
} }
} }
/* Print diag */ /* Print diag */
wxString msg_item; wxString msg_item;
wxString msg; wxString msg;
@ -238,45 +228,22 @@ SCH_ITEM* SCH_EDIT_FRAME::FindComponentAndItem( const wxString& aReference,
switch( aSearchType ) switch( aSearchType )
{ {
default: default:
case FIND_COMPONENT_ONLY: // Find component only case FIND_COMPONENT_ONLY: msg_item = _( "component" ); break;
msg_item = _( "component" ); case FIND_PIN: msg_item.Printf( _( "pin %s" ), aSearchText ); break;
break; case FIND_REFERENCE: msg_item.Printf( _( "reference %s" ), aSearchText ); break;
case FIND_VALUE: msg_item.Printf( _( "value %s" ), aSearchText ); break;
case FIND_PIN: // find a pin case FIND_FIELD: msg_item.Printf( _( "field %s" ), aSearchText ); break;
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;
} }
if( Component ) if( Component )
{ {
if( !notFound ) if( !notFound )
{ msg.Printf( _( "%s %s found" ), aReference, msg_item );
msg.Printf( _( "%s %s found" ), else
GetChars( aReference ), GetChars( msg_item ) ); msg.Printf( _( "%s found but %s not found" ), aReference, msg_item );
} }
else else
{ msg.Printf( _( "Component %s not found" ), aReference );
msg.Printf( _( "%s found but %s not found" ),
GetChars( aReference ), GetChars( msg_item ) );
}
}
else
{
msg.Printf( _( "Component %s not found" ),
GetChars( aReference ) );
}
SetStatusText( msg ); SetStatusText( msg );

View File

@ -449,13 +449,11 @@ public:
* the entire hierarchy * the entire hierarchy
* @param aSearchType A #SCH_SEARCH_T value used to determine what to search for. * @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 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, SCH_ITEM* FindComponentAndItem( const wxString& aReference,
bool aSearchHierarchy, bool aSearchHierarchy,
SCH_SEARCH_T aSearchType, SCH_SEARCH_T aSearchType,
const wxString& aSearchText, const wxString& aSearchText );
bool aWarpMouse );
/** /**
* Breaks a single segment into two at the specified point * Breaks a single segment into two at the specified point