Patches one by Lorenzo, one by Orson

This commit is contained in:
Maciej Sumiński 2013-11-06 11:17:42 -06:00 committed by Dick Hollenbeck
parent eb125838fd
commit bb0f4b9ac3
4 changed files with 9 additions and 4 deletions

View File

@ -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 );
}
}

View File

@ -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

View File

@ -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 ) );

View File

@ -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 )