Cross-probe into schematic using selection rather than HIGHLIGHTED flag

This commit is contained in:
Jon Evans 2020-02-23 22:07:18 -05:00
parent a8e905a1e8
commit b4786e4121
3 changed files with 4 additions and 8 deletions

View File

@ -140,10 +140,9 @@ SCH_ITEM* SCH_EDITOR_CONTROL::FindComponentAndItem( const wxString& aReference,
{
// Clear any existing highlighting
m_toolMgr->RunAction( EE_ACTIONS::clearSelection, true );
m_frame->GetCanvas()->GetView()->HighlightItem( nullptr, nullptr );
if( foundItem )
m_frame->GetCanvas()->GetView()->HighlightItem( foundItem, pin );
m_toolMgr->RunAction( EE_ACTIONS::addItemToSel, true, foundItem );
}
m_probingPcbToSch = false;

View File

@ -237,8 +237,6 @@ float SCH_PAINTER::getShadowWidth()
COLOR4D SCH_PAINTER::getRenderColor( const EDA_ITEM* aItem, int aLayer, bool aDrawingShadows )
{
static COLOR4D highlightColor( 1.0, 0.3, 0.3, 1.0 );
COLOR4D color = m_schSettings.GetLayerColor( aLayer );
if( aItem->Type() == SCH_LINE_T )
@ -256,10 +254,6 @@ COLOR4D SCH_PAINTER::getRenderColor( const EDA_ITEM* aItem, int aLayer, bool aDr
if( aDrawingShadows )
color = m_schSettings.GetLayerColor( LAYER_SELECTION_SHADOWS ).WithAlpha( 0.8 );
}
else if( aItem->IsHighlighted() ) // Cross-probing
{
color = highlightColor;
}
if( m_schSettings.m_ShowDisabled )
color = color.Darken( 0.5f );

View File

@ -151,6 +151,9 @@ typedef const INSPECTOR_FUNC& INSPECTOR; /// std::function passed to nested u
// WARNING: if you add flags, you'll probably need to adjust the masks in GetEditFlags() and
// ClearTempFlags().
// NOTE: The HIGHLIGHTED flag is basically deprecated, it was used for cross-probing before eeschema
// supported real object selection.
#define EDA_ITEM_ALL_FLAGS -1
typedef unsigned STATUS_FLAGS;