Go back to inconsistent cross-probing for now.

Selecting in Eeschema has major issues, as does highlighting in
pcbnew.  So for now we do highlighting in eeschema and selecting
in pcbnew.  Improving highlighting for pcbnew would be the next
logical step....

Fixes: lp:1836640
* https://bugs.launchpad.net/kicad/+bug/1836640
This commit is contained in:
Jeff Young 2019-07-17 12:43:24 +01:00
parent 164d40f235
commit 6cd7d9fb89
2 changed files with 6 additions and 12 deletions

View File

@ -147,12 +147,7 @@ SCH_ITEM* SCH_EDIT_FRAME::FindComponentAndItem( const wxString& aReference,
GetCanvas()->GetView()->HighlightItem( nullptr, nullptr );
if( foundItem )
{
if( aSearchType == SELECT_COMPONENT )
GetToolManager()->RunAction( EE_ACTIONS::addItemToSel, true, foundItem );
else
GetCanvas()->GetView()->HighlightItem( foundItem, pin );
}
GetCanvas()->Refresh();
@ -225,7 +220,7 @@ void SCH_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline )
if( idcmd == NULL ) // Highlight component only (from Cvpcb or Pcbnew)
{
// Highlight component part_ref, or clear Highlight, if part_ref is not existing
FindComponentAndItem( part_ref, true, SELECT_COMPONENT, wxEmptyString );
FindComponentAndItem( part_ref, true, HIGHLIGHT_COMPONENT, wxEmptyString );
return;
}
@ -240,13 +235,13 @@ void SCH_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline )
{
// Highlighting the reference itself isn't actually that useful, and it's harder to
// see. Highlight the parent and display the message.
FindComponentAndItem( part_ref, true, SELECT_COMPONENT, msg );
FindComponentAndItem( part_ref, true, HIGHLIGHT_COMPONENT, msg );
}
else if( strcmp( idcmd, "$VAL:" ) == 0 )
{
// Highlighting the value itself isn't actually that useful, and it's harder to see.
// Highlight the parent and display the message.
FindComponentAndItem( part_ref, true, SELECT_COMPONENT, msg );
FindComponentAndItem( part_ref, true, HIGHLIGHT_COMPONENT, msg );
}
else if( strcmp( idcmd, "$PAD:" ) == 0 )
{
@ -254,7 +249,7 @@ void SCH_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline )
}
else
{
FindComponentAndItem( part_ref, true, SELECT_COMPONENT, wxEmptyString );
FindComponentAndItem( part_ref, true, HIGHLIGHT_COMPONENT, wxEmptyString );
}
}

View File

@ -90,8 +90,7 @@ enum ANNOTATE_OPTION_T {
/// Schematic search type used by the socket link with Pcbnew
enum SCH_SEARCH_T {
HIGHLIGHT_PIN,
HIGHLIGHT_COMPONENT,
SELECT_COMPONENT
HIGHLIGHT_COMPONENT
};