From b4786e4121fa805d495a4273b7b172dacae616fe Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Sun, 23 Feb 2020 22:07:18 -0500 Subject: [PATCH] Cross-probe into schematic using selection rather than HIGHLIGHTED flag --- eeschema/cross-probing.cpp | 3 +-- eeschema/sch_painter.cpp | 6 ------ include/base_struct.h | 3 +++ 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/eeschema/cross-probing.cpp b/eeschema/cross-probing.cpp index 1aebb86c6a..b95c6cd86c 100644 --- a/eeschema/cross-probing.cpp +++ b/eeschema/cross-probing.cpp @@ -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; diff --git a/eeschema/sch_painter.cpp b/eeschema/sch_painter.cpp index b66c23e8a0..151573ea90 100644 --- a/eeschema/sch_painter.cpp +++ b/eeschema/sch_painter.cpp @@ -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 ); diff --git a/include/base_struct.h b/include/base_struct.h index eb6cf24bed..0c082d4c78 100644 --- a/include/base_struct.h +++ b/include/base_struct.h @@ -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;