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
{
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 );
}
}

View File

@ -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

View File

@ -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 );

View File

@ -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