Loading pcbnew/class_dimension.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -489,6 +489,18 @@ wxString DIMENSION::GetSelectMenuText() const } void DIMENSION::ViewGetLayers( int aLayers[], int& aCount ) const { // Layer that simply displays the text aLayers[0] = m_Layer; // On the general purpose overlay there is a selection box displayed aLayers[1] = ITEM_GAL_LAYER( GP_OVERLAY ); aCount = 2; } EDA_ITEM* DIMENSION::Clone() const { return new DIMENSION( *this ); Loading pcbnew/class_dimension.h +3 −0 Original line number Diff line number Diff line Loading @@ -144,6 +144,9 @@ public: EDA_ITEM* Clone() const; /// @copydoc VIEW_ITEM::ViewGetLayers() virtual void ViewGetLayers( int aLayers[], int& aCount ) const; #if defined(DEBUG) virtual void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override #endif Loading pcbnew/pcb_painter.cpp +30 −22 Original line number Diff line number Diff line Loading @@ -236,7 +236,7 @@ bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer ) break; case PCB_DIMENSION_T: draw( (DIMENSION*) aItem ); draw( (DIMENSION*) aItem, aLayer ); break; case PCB_TARGET_T: Loading Loading @@ -784,7 +784,14 @@ void PCB_PAINTER::draw( const ZONE_CONTAINER* aZone ) } void PCB_PAINTER::draw( const DIMENSION* aDimension ) void PCB_PAINTER::draw( const DIMENSION* aDimension, int aLayer ) { if( aLayer == ITEM_GAL_LAYER( GP_OVERLAY ) ) { if( aDimension->IsSelected() ) drawSelectionBox( aDimension ); } else { int layer = aDimension->GetLayer(); COLOR4D strokeColor = GetColor( NULL, layer ); Loading @@ -808,6 +815,7 @@ void PCB_PAINTER::draw( const DIMENSION* aDimension ) // Draw text draw( &aDimension->Text(), layer ); } } void PCB_PAINTER::draw( const PCB_TARGET* aTarget ) Loading pcbnew/pcb_painter.h +1 −1 Original line number Diff line number Diff line Loading @@ -145,7 +145,7 @@ protected: void draw( const TEXTE_PCB*, int ); void draw( const TEXTE_MODULE*, int ); void draw( const ZONE_CONTAINER* ); void draw( const DIMENSION* ); void draw( const DIMENSION*, int ); void draw( const PCB_TARGET* ); /// Draws a white semitransparent box indicating an item as selected Loading Loading
pcbnew/class_dimension.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -489,6 +489,18 @@ wxString DIMENSION::GetSelectMenuText() const } void DIMENSION::ViewGetLayers( int aLayers[], int& aCount ) const { // Layer that simply displays the text aLayers[0] = m_Layer; // On the general purpose overlay there is a selection box displayed aLayers[1] = ITEM_GAL_LAYER( GP_OVERLAY ); aCount = 2; } EDA_ITEM* DIMENSION::Clone() const { return new DIMENSION( *this ); Loading
pcbnew/class_dimension.h +3 −0 Original line number Diff line number Diff line Loading @@ -144,6 +144,9 @@ public: EDA_ITEM* Clone() const; /// @copydoc VIEW_ITEM::ViewGetLayers() virtual void ViewGetLayers( int aLayers[], int& aCount ) const; #if defined(DEBUG) virtual void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override #endif Loading
pcbnew/pcb_painter.cpp +30 −22 Original line number Diff line number Diff line Loading @@ -236,7 +236,7 @@ bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer ) break; case PCB_DIMENSION_T: draw( (DIMENSION*) aItem ); draw( (DIMENSION*) aItem, aLayer ); break; case PCB_TARGET_T: Loading Loading @@ -784,7 +784,14 @@ void PCB_PAINTER::draw( const ZONE_CONTAINER* aZone ) } void PCB_PAINTER::draw( const DIMENSION* aDimension ) void PCB_PAINTER::draw( const DIMENSION* aDimension, int aLayer ) { if( aLayer == ITEM_GAL_LAYER( GP_OVERLAY ) ) { if( aDimension->IsSelected() ) drawSelectionBox( aDimension ); } else { int layer = aDimension->GetLayer(); COLOR4D strokeColor = GetColor( NULL, layer ); Loading @@ -808,6 +815,7 @@ void PCB_PAINTER::draw( const DIMENSION* aDimension ) // Draw text draw( &aDimension->Text(), layer ); } } void PCB_PAINTER::draw( const PCB_TARGET* aTarget ) Loading
pcbnew/pcb_painter.h +1 −1 Original line number Diff line number Diff line Loading @@ -145,7 +145,7 @@ protected: void draw( const TEXTE_PCB*, int ); void draw( const TEXTE_MODULE*, int ); void draw( const ZONE_CONTAINER* ); void draw( const DIMENSION* ); void draw( const DIMENSION*, int ); void draw( const PCB_TARGET* ); /// Draws a white semitransparent box indicating an item as selected Loading