Commit bb0f4b9a authored by Maciej Sumiński's avatar Maciej Sumiński Committed by Dick Hollenbeck

Patches one by Lorenzo, one by Orson

parent eb125838
......@@ -645,7 +645,7 @@ void VIEW::draw( VIEW_ITEM* aItem, bool aImmediate ) const
for( int i = 0; i < layers_count; ++i )
{
m_gal->SetLayerDepth( m_layers.at( i ).renderingOrder );
m_gal->SetLayerDepth( m_layers.at( layers[i] ).renderingOrder );
draw( aItem, layers[i], aImmediate );
}
}
......
......@@ -41,7 +41,6 @@ class BOARD;
/* Layer identification (layer number) */
typedef int LAYER_NUM;
#define UNDEFINED_LAYER -1
#define NO_LAYER 0
#define FIRST_LAYER 0
#define FIRST_COPPER_LAYER 0
#define LAYER_N_BACK 0
......
......@@ -670,13 +670,19 @@ void PCB_PAINTER::draw( const DRAWSEGMENT* aSegment )
m_gal->SetFillColor( color );
m_gal->Save();
m_gal->Translate( VECTOR2D( aSegment->GetPosition() ) );
MODULE* module = aSegment->GetParentModule();
if( module )
{
m_gal->Translate( module->GetPosition() );
m_gal->Rotate( -module->GetOrientation() * M_PI / 1800.0 );
}
else
{
// not tested
m_gal->Translate( aSegment->GetPosition() );
m_gal->Rotate( -aSegment->GetAngle() * M_PI / 1800.0 );
}
std::copy( aSegment->GetPolyPoints().begin(), aSegment->GetPolyPoints().end(),
std::back_inserter( pointsList ) );
......
......@@ -831,7 +831,7 @@ void PCB_EDIT_FRAME::setTopLayer( LAYER_NUM aLayer )
GetNetnameLayer( aLayer ), ITEM_GAL_LAYER( VIAS_VISIBLE ),
ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ),
ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ),
ITEM_GAL_LAYER( GP_OVERLAY )
ITEM_GAL_LAYER( GP_OVERLAY ), DRAW_N
};
for( unsigned int i = 0; i < sizeof( layers ) / sizeof( LAYER_NUM ); ++i )
......
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