From 30f19be5558b71d69309a3cc911c61354d2ba0f1 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 8 Jul 2013 14:06:45 +0200 Subject: [PATCH] Fixed 'disappearing via' issue. --- pcbnew/class_track.cpp | 8 ++++++++ pcbnew/class_track.h | 3 +++ 2 files changed, 11 insertions(+) diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index 784556c814..54ab04e58c 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -1001,6 +1001,14 @@ void SEGVIA::ViewGetLayers( int aLayers[], int& aCount ) const } +void SEGVIA::ViewGetRequiredLayers( int aLayers[], int& aCount ) const +{ + // The only required layer is via itself, holes are optional + aLayers[0] = ITEM_GAL_LAYER( VIAS_VISIBLE ); + aCount = 1; +} + + // see class_track.h void TRACK::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) { diff --git a/pcbnew/class_track.h b/pcbnew/class_track.h index 87ea39f3f0..bbacb4e3aa 100644 --- a/pcbnew/class_track.h +++ b/pcbnew/class_track.h @@ -424,6 +424,9 @@ public: /// @copydoc VIEW_ITEM::ViewGetLayers() virtual void ViewGetLayers( int aLayers[], int& aCount ) const; + /// @copydoc VIEW_ITEM::ViewGetRequiredLayers() + virtual void ViewGetRequiredLayers( int aLayers[], int& aCount ) const; + #if defined (DEBUG) virtual void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override #endif