diff --git a/common/render_settings.cpp b/common/render_settings.cpp index 946f37d504..23b01a01b7 100644 --- a/common/render_settings.cpp +++ b/common/render_settings.cpp @@ -33,7 +33,6 @@ RENDER_SETTINGS::RENDER_SETTINGS() : // Set the default initial values m_highlightFactor = 0.5f; m_selectFactor = 0.5f; - m_highlightItems = false; m_highlightEnabled = false; m_hiContrastEnabled = false; m_hiContrastFactor = 0.2f; //TODO: Make this user-configurable diff --git a/eeschema/cross-probing.cpp b/eeschema/cross-probing.cpp index 12fa89f3db..c7793331bb 100644 --- a/eeschema/cross-probing.cpp +++ b/eeschema/cross-probing.cpp @@ -182,12 +182,7 @@ void SCH_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline ) if( strcmp( idcmd, "$CLEAR:" ) == 0 ) { - if( text && strcmp( text, "HIGHLIGHTED" ) == 0 ) - { - GetCanvas()->GetView()->HighlightItem( nullptr, nullptr ); - GetCanvas()->Refresh(); - } - + // Cross-probing is now done through selection so we no longer need a clear command return; } diff --git a/eeschema/dialogs/dialog_fields_editor_global.cpp b/eeschema/dialogs/dialog_fields_editor_global.cpp index 7dff64a1bf..5a0f3b14b4 100644 --- a/eeschema/dialogs/dialog_fields_editor_global.cpp +++ b/eeschema/dialogs/dialog_fields_editor_global.cpp @@ -821,10 +821,6 @@ DIALOG_FIELDS_EDITOR_GLOBAL::~DIALOG_FIELDS_EDITOR_GLOBAL() m_grid->PopEventHandler( true ); // we gave ownership of m_dataModel to the wxGrid... - - // Clear highlighted symbols, if any - m_parent->GetCanvas()->GetView()->HighlightItem( nullptr, nullptr ); - m_parent->GetCanvas()->Refresh(); } @@ -1130,10 +1126,6 @@ void DIALOG_FIELDS_EDITOR_GLOBAL::OnTableCellClick( wxGridEvent& event ) m_grid->ClearSelection(); m_grid->SetGridCursor( event.GetRow(), event.GetCol() ); - // Clear highlighted symbols, if any - m_parent->GetCanvas()->GetView()->HighlightItem( nullptr, nullptr ); - m_parent->GetCanvas()->Refresh(); - m_dataModel->ExpandCollapseRow( event.GetRow() ); std::vector refs = m_dataModel->GetRowReferences( event.GetRow() ); diff --git a/eeschema/sch_component.cpp b/eeschema/sch_component.cpp index 933b36cdf4..b0dcfa37f9 100644 --- a/eeschema/sch_component.cpp +++ b/eeschema/sch_component.cpp @@ -1756,58 +1756,3 @@ void SCH_COMPONENT::BrightenPin( LIB_PIN* aPin ) } -void SCH_COMPONENT::ClearHighlightedPins() -{ - for( auto& pin : m_pins ) - pin->ClearHighlighted(); -} - - -bool SCH_COMPONENT::HasHighlightedPins() -{ - for( const auto& pin : m_pins ) - { - if( pin->IsHighlighted() ) - return true; - } - - return false; -} - - -void SCH_COMPONENT::HighlightPin( LIB_PIN* aPin ) -{ - if( m_pinMap.count( aPin ) ) - m_pins[ m_pinMap.at( aPin ) ]->SetHighlighted(); -} - - -bool SCH_COMPONENT::ClearAllHighlightFlags() -{ - bool retVal = false; - - if( IsHighlighted() ) - { - ClearFlags( HIGHLIGHTED ); - retVal = true; - } - - // Clear the HIGHLIGHTED flag of pins - if( HasHighlightedPins() ) - { - ClearHighlightedPins(); - retVal = true; - } - - // Clear the HIGHLIGHTED flag of other items, currently only fields - for( SCH_FIELD& each_field : m_Fields ) - { - if( each_field.IsHighlighted() ) - { - each_field.ClearFlags( HIGHLIGHTED ); - retVal = true; - } - } - - return retVal; -} diff --git a/eeschema/sch_component.h b/eeschema/sch_component.h index b3ac5b1ec7..3de9331746 100644 --- a/eeschema/sch_component.h +++ b/eeschema/sch_component.h @@ -674,12 +674,6 @@ public: void BrightenPin( LIB_PIN* aPin ); - void ClearHighlightedPins(); - - bool HasHighlightedPins(); - - void HighlightPin( LIB_PIN* aPin ); - bool GetIncludeInBom() const { return m_inBom; } void SetIncludeInBom( bool aIncludeInBom ) { m_inBom = aIncludeInBom; } diff --git a/eeschema/sch_item.cpp b/eeschema/sch_item.cpp index 7cc8347df0..faed03bfd9 100644 --- a/eeschema/sch_item.cpp +++ b/eeschema/sch_item.cpp @@ -82,17 +82,17 @@ SCH_ITEM* SCH_ITEM::Duplicate( bool doClone ) const if( !doClone ) const_cast( newItem->m_Uuid ) = KIID(); - newItem->ClearFlags( SELECTED | HIGHLIGHTED | BRIGHTENED ); + newItem->ClearFlags( SELECTED | BRIGHTENED ); if( newItem->Type() == SCH_COMPONENT_T ) { SCH_COMPONENT* component = (SCH_COMPONENT*) newItem; for( SCH_PIN* pin : component->GetSchPins() ) - pin->ClearFlags( SELECTED | HIGHLIGHTED | BRIGHTENED ); + pin->ClearFlags( SELECTED | BRIGHTENED ); for( SCH_FIELD& field : component->GetFields() ) - field.ClearFlags( SELECTED | HIGHLIGHTED | BRIGHTENED ); + field.ClearFlags( SELECTED | BRIGHTENED ); } if( newItem->Type() == SCH_SHEET_T ) @@ -100,10 +100,10 @@ SCH_ITEM* SCH_ITEM::Duplicate( bool doClone ) const SCH_SHEET* sheet = (SCH_SHEET*) newItem; for( SCH_FIELD& field : sheet->GetFields() ) - field.ClearFlags( SELECTED | HIGHLIGHTED | BRIGHTENED ); + field.ClearFlags( SELECTED | BRIGHTENED ); for( SCH_SHEET_PIN* pin : sheet->GetPins() ) - pin->ClearFlags( SELECTED | HIGHLIGHTED | BRIGHTENED ); + pin->ClearFlags( SELECTED | BRIGHTENED ); } return newItem; diff --git a/eeschema/sch_painter.cpp b/eeschema/sch_painter.cpp index 30d0375afa..d725aef0c0 100644 --- a/eeschema/sch_painter.cpp +++ b/eeschema/sch_painter.cpp @@ -1783,7 +1783,7 @@ void SCH_PAINTER::draw( SCH_BITMAP *aBitmap, int aLayer ) if( aLayer == LAYER_SELECTION_SHADOWS ) { - if( aBitmap->IsSelected() || aBitmap->IsBrightened() || aBitmap->IsHighlighted() ) + if( aBitmap->IsSelected() || aBitmap->IsBrightened() ) { COLOR4D color = getRenderColor( aBitmap, LAYER_DRAW_BITMAPS, true ); m_gal->SetIsStroke( true ); diff --git a/eeschema/sch_view.cpp b/eeschema/sch_view.cpp index 7e27a07093..33321274ef 100644 --- a/eeschema/sch_view.cpp +++ b/eeschema/sch_view.cpp @@ -225,42 +225,4 @@ void SCH_VIEW::HideWorksheet() } -void SCH_VIEW::HighlightItem( EDA_ITEM *aItem, LIB_PIN* aPin ) -{ - if( aItem && aItem->Type() == SCH_COMPONENT_T && aPin ) - { - static_cast( aItem )->HighlightPin( aPin ); - Update( aItem, REPAINT ); - } - else if( aItem ) - { - aItem->SetFlags( HIGHLIGHTED ); - Update( aItem, REPAINT ); - } - else - { - for( auto item : *m_allItems ) - { - // Not all view items can be highlighted, only EDA_ITEMs - // So clear flag of only EDA_ITEMs. - EDA_ITEM* eitem = dynamic_cast( item ); - - if( eitem ) - { - if( eitem->IsHighlighted() ) - { - eitem->ClearFlags( HIGHLIGHTED ); - Update( eitem, REPAINT ); - } - - if( eitem->Type() == SCH_COMPONENT_T ) - { - // Items inside a component (pins, fields can be highlighted. - static_cast( eitem )->ClearAllHighlightFlags(); - } - } - } - } -} - }; // namespace KIGFX diff --git a/eeschema/sch_view.h b/eeschema/sch_view.h index 44ca986d3a..2de9785e0a 100644 --- a/eeschema/sch_view.h +++ b/eeschema/sch_view.h @@ -100,8 +100,6 @@ public: WS_PROXY_VIEW_ITEM* GetWorksheet() const { return m_worksheet.get(); } - void HighlightItem( EDA_ITEM *aItem, LIB_PIN* aPin = nullptr ); - private: SCH_BASE_FRAME* m_frame; // The frame using this view. Can be null. Used mainly // to know the sheet path name when drawing the page layout diff --git a/include/base_struct.h b/include/base_struct.h index 44adbc32f8..e489fccf49 100644 --- a/include/base_struct.h +++ b/include/base_struct.h @@ -130,13 +130,12 @@ typedef const INSPECTOR_FUNC& INSPECTOR; /// std::function passed to nested u #define IS_PASTED (1 << 17) ///< Modifier on IS_NEW which indicates it came from clipboard #define TRACK_LOCKED (1 << 18) ///< Pcbnew: track locked: protected from global deletion #define TRACK_AR (1 << 19) ///< Pcbnew: autorouted track -#define FLAG1 (1 << 20) ///< Pcbnew: flag used in local computations -#define FLAG0 (1 << 21) ///< Pcbnew: flag used in local computations +#define OBSOLETE_1 (1 << 20) ///< Not presently used +#define OBSOLETE_2 (1 << 21) ///< Not presently used #define BEGIN_ONPAD (1 << 22) ///< Pcbnew: flag set for track segment starting on a pad #define END_ONPAD (1 << 23) ///< Pcbnew: flag set for track segment ending on a pad -#define BUSY (1 << 24) ///< Pcbnew: flag indicating that the structure has - ///< already been edited, in some functions -#define HIGHLIGHTED (1 << 25) ///< item is drawn in normal colors, when the rest is darkened +#define OBSOLETE_3 (1 << 24) ///< Not presently used +#define OBSOLETE_4 (1 << 25) ///< Not presently used #define BRIGHTENED (1 << 26) ///< item is drawn with a bright contour #define DP_COUPLED (1 << 27) ///< item is coupled with another item making a differential pair @@ -148,9 +147,6 @@ 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; @@ -206,16 +202,13 @@ public: inline bool IsWireImage() const { return m_Flags & IS_WIRE_IMAGE; } inline bool IsSelected() const { return m_Flags & SELECTED; } inline bool IsResized() const { return m_Flags & IS_RESIZED; } - inline bool IsHighlighted() const { return m_Flags & HIGHLIGHTED; } inline bool IsBrightened() const { return m_Flags & BRIGHTENED; } inline void SetWireImage() { SetFlags( IS_WIRE_IMAGE ); } inline void SetSelected() { SetFlags( SELECTED ); } - inline void SetHighlighted() { SetFlags( HIGHLIGHTED ); } inline void SetBrightened() { SetFlags( BRIGHTENED ); } inline void ClearSelected() { ClearFlags( SELECTED ); } - inline void ClearHighlighted() { ClearFlags( HIGHLIGHTED ); } inline void ClearBrightened() { ClearFlags( BRIGHTENED ); } void SetModified(); @@ -252,7 +245,7 @@ public: void ClearTempFlags() { ClearFlags( STARTPOINT | ENDPOINT | CANDIDATE | TEMP_SELECTED | IS_LINKED | SKIP_STRUCT | - DO_NOT_DRAW | FLAG0 | FLAG1 | BUSY ); + DO_NOT_DRAW ); } void ClearEditFlags() diff --git a/include/render_settings.h b/include/render_settings.h index e5fa3efe29..f3965c4a3b 100644 --- a/include/render_settings.h +++ b/include/render_settings.h @@ -123,14 +123,12 @@ public: /** * Function SetHighlight - * Turns on/off highlighting - it may be done for the active layer, the specified net, or - * items with their HIGHLIGHTED flags set. + * Turns on/off highlighting - it may be done for the active layer or the specified net(s). * @param aEnabled tells if highlighting should be enabled. * @param aNetcode is optional and if specified, turns on higlighting only for the net with * number given as the parameter. */ - inline void SetHighlight( bool aEnabled, int aNetcode = -1, bool aHighlightItems = false, - bool aMulti = false ) + inline void SetHighlight( bool aEnabled, int aNetcode = -1, bool aMulti = false ) { m_highlightEnabled = aEnabled; @@ -143,8 +141,6 @@ public: } else m_highlightNetcodes.clear(); - - m_highlightItems = aEnabled ? aHighlightItems : false; } /** @@ -257,24 +253,21 @@ protected: COLOR4D m_backgroundColor; // The background color /// Parameters for display modes - bool m_hiContrastEnabled; // High contrast display mode on/off - float m_hiContrastFactor; // Factor used for computing high contrast color + bool m_hiContrastEnabled; // High contrast display mode on/off + float m_hiContrastFactor; // Factor used for computing high contrast color - bool m_highlightEnabled; // Highlight display mode on/off + bool m_highlightEnabled; // Highlight display mode on/off + std::set m_highlightNetcodes; // Set of net cods to be highlighted + float m_highlightFactor; // Factor used for computing highlight color - std::set m_highlightNetcodes; // Set of net cods to be highlighted + float m_selectFactor; // Specifies how color of selected items is changed + float m_outlineWidth; // Line width used when drawing outlines + float m_worksheetLineWidth; // Line width used when drawing worksheet - bool m_highlightItems; // Highlight items with their HIGHLIGHT flags set - float m_highlightFactor; // Factor used for computing highlight color + int m_defaultPenWidth; + bool m_showPageLimits; - float m_selectFactor; // Specifies how color of selected items is changed - float m_outlineWidth; // Line width used when drawing outlines - float m_worksheetLineWidth; // Line width used when drawing worksheet - - int m_defaultPenWidth; - bool m_showPageLimits; - - wxDC* m_printDC; // This can go away once we have Cairo-based printing. + wxDC* m_printDC; // This can go away once we have Cairo-based printing. }; } diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index edfa6a699d..968078e0fd 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -1226,8 +1226,8 @@ int BOARD::SortedNetnamesList( wxArrayString& aNames, bool aSortbyPadsCount ) } -ZONE_CONTAINER* BOARD::HitTestForAnyFilledArea( const wxPoint& aRefPos, - PCB_LAYER_ID aStartLayer, PCB_LAYER_ID aEndLayer, int aNetCode ) +ZONE_CONTAINER* BOARD::HitTestForAnyFilledArea( const wxPoint& aRefPos, PCB_LAYER_ID aStartLayer, + PCB_LAYER_ID aEndLayer, int aNetCode ) { if( aEndLayer < 0 ) aEndLayer = aStartLayer; @@ -1240,10 +1240,6 @@ ZONE_CONTAINER* BOARD::HitTestForAnyFilledArea( const wxPoint& aRefPos, if( area->GetLayer() < aStartLayer || area->GetLayer() > aEndLayer ) continue; - // In locate functions we must skip tagged items with BUSY flag set. - if( area->GetState( BUSY ) ) - continue; - if( aNetCode >= 0 && area->GetNetCode() != aNetCode ) continue; diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index 42eaae95d7..81e76b7de6 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -859,7 +859,6 @@ public: * Function HitTestForAnyFilledArea * tests if the given wxPoint is within the bounds of a filled area of this zone. * the test is made on zones on layer from aStartLayer to aEndLayer - * Note: if a zone has its flag BUSY (in .m_State) is set, it is ignored. * @param aRefPos A wxPoint to test * @param aStartLayer the first layer to test * @param aEndLayer the last layer to test diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index f966fa7afa..f40b0e5b3f 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -972,21 +972,12 @@ wxString TRACK::ShowState( int stateBits ) if( stateBits & IS_DELETED ) ret << wxT( " | IS_DELETED" ); - if( stateBits & BUSY ) - ret << wxT( " | BUSY" ); - if( stateBits & END_ONPAD ) ret << wxT( " | END_ONPAD" ); if( stateBits & BEGIN_ONPAD ) ret << wxT( " | BEGIN_ONPAD" ); - if( stateBits & FLAG0 ) - ret << wxT( " | FLAG0" ); - - if( stateBits & FLAG1 ) - ret << wxT( " | FLAG1" ); - return ret; } diff --git a/pcbnew/class_track.h b/pcbnew/class_track.h index d078c5329a..6b6a401570 100644 --- a/pcbnew/class_track.h +++ b/pcbnew/class_track.h @@ -238,7 +238,7 @@ public: /** * Function ShowState * converts a set of state bits to a wxString - * @param stateBits Is an OR-ed together set of bits like BUSY, EDIT, etc. + * @param stateBits Is an OR-ed together set of bits like IN_EDIT, etc. */ static wxString ShowState( int stateBits ); diff --git a/pcbnew/cross-probing.cpp b/pcbnew/cross-probing.cpp index d186865b95..84fbc556e1 100644 --- a/pcbnew/cross-probing.cpp +++ b/pcbnew/cross-probing.cpp @@ -127,7 +127,7 @@ void PCB_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline ) else { pcb->SetHighLightNet( netinfo->GetNet(), true ); - renderSettings->SetHighlight( true, netinfo->GetNet(), false, true ); + renderSettings->SetHighlight( true, netinfo->GetNet(), true ); } } } diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index 97a6950479..2b74eb3e24 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -167,7 +167,7 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aP if( aPad ) { *m_dummyPad = *aPad; - m_dummyPad->ClearFlags( SELECTED|HIGHLIGHTED|BRIGHTENED ); + m_dummyPad->ClearFlags( SELECTED|BRIGHTENED ); } else // We are editing a "master" pad, i.e. a template to create new pads *m_dummyPad = *m_padMaster; diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 65f60aca45..7a6e083a18 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -33,7 +33,6 @@ #include #include #include -#include #include #include @@ -46,7 +45,6 @@ #include #include #include -#include using namespace KIGFX; @@ -240,14 +238,6 @@ const COLOR4D& PCB_RENDER_SETTINGS::GetColor( const VIEW_ITEM* aItem, int aLayer return m_layerColorsSel[aLayer]; } - if( m_highlightEnabled && m_highlightItems ) - { - if( item->IsHighlighted() ) - return m_layerColorsHi[aLayer]; - else - return m_layerColorsDark[aLayer]; - } - // Try to obtain the netcode for the item if( const BOARD_CONNECTED_ITEM* conItem = dyn_cast ( item ) ) netCode = conItem->GetNetCode(); @@ -762,15 +752,9 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) // Hole color is the background color for plated holes, but only if the pad size is greater than the hole size. // ( Don't let pads that *should* be NPTH get lost ) if( ( aLayer == LAYER_PADS_PLATEDHOLES ) && !aPad->PadShouldBeNPTH() ) - { - color = m_pcbSettings.GetBackgroundColor(); - } + color = m_pcbSettings.GetBackgroundColor(); else - { color = m_pcbSettings.GetColor( aPad, aLayer ); - } - - VECTOR2D size; if( m_pcbSettings.m_sketchMode[LAYER_PADS_TH] ) { diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index 61661245d9..1cdbfbd50f 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -733,9 +733,9 @@ static void moveNoFlagToVector( std::deque& aList, std::vector& std::copy_if( aList.begin(), aList.end(), std::back_inserter( aTarget ), [aIsNew]( T aItem ) { - bool doCopy = ( aItem->GetFlags() & FLAG0 ) == 0; + bool doCopy = ( aItem->GetFlags() & SKIP_STRUCT ) == 0; - aItem->ClearFlags( FLAG0 ); + aItem->ClearFlags( SKIP_STRUCT ); aItem->SetFlags( aIsNew ? IS_NEW : 0 ); return doCopy; @@ -746,7 +746,8 @@ static void moveNoFlagToVector( std::deque& aList, std::vector& } -static void moveNoFlagToVector( ZONE_CONTAINERS& aList, std::vector& aTarget, bool aIsNew ) +static void moveNoFlagToVector( ZONE_CONTAINERS& aList, std::vector& aTarget, + bool aIsNew ) { if( aList.size() == 0 ) return; @@ -762,8 +763,8 @@ static void moveNoFlagToVector( ZONE_CONTAINERS& aList, std::vectorHasFlag( FLAG0 ) ) - obj->ClearFlags( FLAG0 ); + if( obj->HasFlag( SKIP_STRUCT ) ) + obj->ClearFlags( SKIP_STRUCT ); else aTarget.push_back( obj ); @@ -858,16 +859,16 @@ int PCBNEW_CONTROL::AppendBoard( PLUGIN& pi, wxString& fileName ) // Mark existing items, in order to know what are the new items so we can select only // the new items after loading for( auto track : brd->Tracks() ) - track->SetFlags( FLAG0 ); + track->SetFlags( SKIP_STRUCT ); for( auto module : brd->Modules() ) - module->SetFlags( FLAG0 ); + module->SetFlags( SKIP_STRUCT ); for( auto drawing : brd->Drawings() ) - drawing->SetFlags( FLAG0 ); + drawing->SetFlags( SKIP_STRUCT ); for( auto zone : brd->Zones() ) - zone->SetFlags( FLAG0 ); + zone->SetFlags( SKIP_STRUCT ); // Keep also the count of copper layers, to adjust if necessary int initialCopperLayerCount = brd->GetCopperLayerCount(); diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 199c07b107..4c33b5b497 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -819,16 +819,15 @@ int SELECTION_TOOL::expandConnection( const TOOL_EVENT& aEvent ) // copy the selection, since we're going to iterate and modify std::deque selectedItems = m_selection.GetItems(); - // We use the BUSY flag to mark connections for( EDA_ITEM* item : selectedItems ) - item->SetState( BUSY, false ); + item->ClearTempFlags(); for( EDA_ITEM* item : selectedItems ) { TRACK* trackItem = dynamic_cast( item ); - // Track items marked BUSY have already been visited - if( trackItem && !trackItem->GetState( BUSY ) ) + // Track items marked SKIP_STRUCT have already been visited + if( trackItem && !( trackItem->GetFlags() & SKIP_STRUCT ) ) selectConnectedTracks( *trackItem, stopCondition ); } @@ -884,7 +883,7 @@ void SELECTION_TOOL::selectConnectedTracks( BOARD_CONNECTED_ITEM& aStartItem, break; } - item->SetState( SKIP_STRUCT, false ); + item->SetFlags( SKIP_STRUCT ); } std::vector activePts; diff --git a/pcbnew/tracks_cleaner.cpp b/pcbnew/tracks_cleaner.cpp index 8995e403b6..4889bd1264 100644 --- a/pcbnew/tracks_cleaner.cpp +++ b/pcbnew/tracks_cleaner.cpp @@ -104,9 +104,7 @@ void TRACKS_CLEANER::removeBadTrackSegments() for( TRACK* segment : m_brd->Tracks() ) { - segment->SetState( FLAG0, false ); - - for( auto testedPad : connectivity->GetConnectedPads( segment ) ) + for( D_PAD* testedPad : connectivity->GetConnectedPads( segment ) ) { if( segment->GetNetCode() != testedPad->GetNetCode() ) { @@ -120,7 +118,7 @@ void TRACKS_CLEANER::removeBadTrackSegments() for( TRACK* testedTrack : connectivity->GetConnectedTracks( segment ) ) { - if( segment->GetNetCode() != testedTrack->GetNetCode() && !testedTrack->GetState( FLAG0 ) ) + if( segment->GetNetCode() != testedTrack->GetNetCode() ) { CLEANUP_ITEM* item = new CLEANUP_ITEM( CLEANUP_SHORT ); item->SetItems( segment );