minor compil warnings and drawings fix

This commit is contained in:
jean-pierre charras 2018-09-06 17:55:37 +02:00 committed by Jeff Young
parent 3c82ad3220
commit 906c52deff
4 changed files with 5 additions and 6 deletions

View File

@ -342,7 +342,6 @@ void LIB_PART::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDc, const wxPoint& aOffset,
int aMulti, int aConvert, const PART_DRAW_OPTIONS& aOpts )
{
BASE_SCREEN* screen = aPanel ? aPanel->GetScreen() : NULL;
GRSetDrawMode( aDc, aOpts.draw_mode );
/* draw background for filled items using background option
@ -410,7 +409,7 @@ void LIB_PART::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDc, const wxPoint& aOffset,
if( drawItem.Type() == LIB_FIELD_T )
{
LIB_FIELD& field = dynamic_cast<LIB_FIELD&>( drawItem );
LIB_FIELD& field = static_cast<LIB_FIELD&>( drawItem );
if( field.IsVisible() && !aOpts.draw_visible_fields )
continue;
@ -421,7 +420,7 @@ void LIB_PART::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDc, const wxPoint& aOffset,
if( drawItem.Type() == LIB_PIN_T )
{
LIB_PIN& pin = dynamic_cast<LIB_PIN&>( drawItem );
LIB_PIN& pin = static_cast<LIB_PIN&>( drawItem );
uintptr_t flags = 0;
if( aOpts.show_pin_text )

View File

@ -146,10 +146,10 @@ void LIB_ITEM::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
m_Fill = fillMode;
}
else
#endif
{
drawGraphic( aPanel, aDC, aOffset, aColor, aDrawMode, aData, aTransform );
}
#endif
}

View File

@ -677,7 +677,7 @@ void SCH_PAINTER::draw( LIB_PIN *aPin, int aLayer, bool isDangling, bool isMovin
// Four locations around a pin where text can be drawn
enum { INSIDE = 0, OUTSIDE, ABOVE, BELOW };
int size[4] = { 0, 0, 0, 0 };
int thickness[4];
int thickness[4] = { numLineWidth, numLineWidth, numLineWidth, numLineWidth };
COLOR4D colour[4];
wxString text[4];

View File

@ -136,7 +136,7 @@ public:
m_sketchBoardGfx = aEnabled;
}
inline bool IsBackgroundDark() const
inline bool IsBackgroundDark() const override
{
auto luma = m_layerColors[ LAYER_PCB_BACKGROUND ].GetBrightness();