Commit f53dafd4 authored by Maciej Suminski's avatar Maciej Suminski

Modules are marked to be on copper layer too.

parent 3d0753c9
...@@ -1027,6 +1027,7 @@ void MODULE::SetOrientation( double newangle ) ...@@ -1027,6 +1027,7 @@ void MODULE::SetOrientation( double newangle )
void MODULE::ViewGetLayers( int aLayers[], int& aCount ) const void MODULE::ViewGetLayers( int aLayers[], int& aCount ) const
{ {
aCount = 1; aCount = 2;
aLayers[0] = ITEM_GAL_LAYER( SELECTION ); // Selection box aLayers[0] = ITEM_GAL_LAYER( SELECTION ); // Selection box
aLayers[1] = m_Layer;
} }
...@@ -229,7 +229,7 @@ bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer ) ...@@ -229,7 +229,7 @@ bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer )
break; break;
case PCB_MODULE_T: case PCB_MODULE_T:
draw( (MODULE*) aItem ); draw( (MODULE*) aItem, aLayer );
break; break;
case PCB_TEXT_T: case PCB_TEXT_T:
...@@ -700,11 +700,14 @@ void PCB_PAINTER::draw( const DRAWSEGMENT* aSegment ) ...@@ -700,11 +700,14 @@ void PCB_PAINTER::draw( const DRAWSEGMENT* aSegment )
} }
void PCB_PAINTER::draw( const MODULE* aModule ) void PCB_PAINTER::draw( const MODULE* aModule, int aLayer )
{ {
// For modules we have to draw a selection box if needed // For modules we have to draw a selection box if needed
if( aLayer == ITEM_GAL_LAYER( SELECTION ) )
{
if( aModule->IsSelected() ) if( aModule->IsSelected() )
drawSelectionBox( aModule ); drawSelectionBox( aModule );
}
} }
......
...@@ -145,7 +145,7 @@ protected: ...@@ -145,7 +145,7 @@ protected:
void draw( const SEGVIA*, int ); void draw( const SEGVIA*, int );
void draw( const D_PAD*, int ); void draw( const D_PAD*, int );
void draw( const DRAWSEGMENT* ); void draw( const DRAWSEGMENT* );
void draw( const MODULE* ); void draw( const MODULE*, int );
void draw( const TEXTE_PCB*, int ); void draw( const TEXTE_PCB*, int );
void draw( const TEXTE_MODULE*, int ); void draw( const TEXTE_MODULE*, int );
void draw( const ZONE_CONTAINER* ); void draw( const ZONE_CONTAINER* );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment