Minor changes: minor code cleanup and fix minor Coverity warning
This commit is contained in:
parent
ae99e627bd
commit
76bdb423d7
|
@ -973,34 +973,19 @@ void SCH_SHEET::Plot( PLOTTER* aPlotter ) const
|
||||||
if( override || backgroundColor == COLOR4D::UNSPECIFIED )
|
if( override || backgroundColor == COLOR4D::UNSPECIFIED )
|
||||||
backgroundColor = aPlotter->RenderSettings()->GetLayerColor( LAYER_SHEET_BACKGROUND );
|
backgroundColor = aPlotter->RenderSettings()->GetLayerColor( LAYER_SHEET_BACKGROUND );
|
||||||
|
|
||||||
aPlotter->SetColor( backgroundColor );
|
|
||||||
// Do not fill shape in B&W mode, otherwise texts are unreadable
|
// Do not fill shape in B&W mode, otherwise texts are unreadable
|
||||||
bool fill = aPlotter->GetColorMode();
|
bool fill = aPlotter->GetColorMode();
|
||||||
|
|
||||||
aPlotter->Rect( m_pos, m_pos + m_size, fill ? FILL_TYPE::FILLED_SHAPE : FILL_TYPE::NO_FILL,
|
if( fill )
|
||||||
1.0 );
|
{
|
||||||
|
aPlotter->SetColor( backgroundColor );
|
||||||
|
aPlotter->Rect( m_pos, m_pos + m_size, FILL_TYPE::FILLED_SHAPE, 1 );
|
||||||
|
}
|
||||||
|
|
||||||
aPlotter->SetColor( borderColor );
|
aPlotter->SetColor( borderColor );
|
||||||
|
|
||||||
int penWidth = std::max( GetPenWidth(), aPlotter->RenderSettings()->GetMinPenWidth() );
|
int penWidth = std::max( GetPenWidth(), aPlotter->RenderSettings()->GetMinPenWidth() );
|
||||||
aPlotter->SetCurrentLineWidth( penWidth );
|
aPlotter->Rect( m_pos, m_pos + m_size, FILL_TYPE::NO_FILL, penWidth );
|
||||||
|
|
||||||
aPlotter->MoveTo( m_pos );
|
|
||||||
pos = m_pos;
|
|
||||||
pos.x += m_size.x;
|
|
||||||
|
|
||||||
aPlotter->LineTo( pos );
|
|
||||||
pos.y += m_size.y;
|
|
||||||
|
|
||||||
aPlotter->LineTo( pos );
|
|
||||||
pos = m_pos;
|
|
||||||
pos.y += m_size.y;
|
|
||||||
|
|
||||||
aPlotter->LineTo( pos );
|
|
||||||
aPlotter->FinishTo( m_pos );
|
|
||||||
|
|
||||||
for( SCH_FIELD field : m_fields )
|
|
||||||
field.Plot( aPlotter );
|
|
||||||
|
|
||||||
/* Draw texts : SheetLabel */
|
/* Draw texts : SheetLabel */
|
||||||
for( SCH_SHEET_PIN* sheetPin : m_pins )
|
for( SCH_SHEET_PIN* sheetPin : m_pins )
|
||||||
|
|
|
@ -131,7 +131,8 @@ struct EXCELLON_ROUTE_COORD
|
||||||
* Handle a drill image.
|
* Handle a drill image.
|
||||||
*
|
*
|
||||||
* It is derived from #GERBER_FILE_IMAGE because there is a lot of likeness between EXCELLON
|
* It is derived from #GERBER_FILE_IMAGE because there is a lot of likeness between EXCELLON
|
||||||
* files and GERBER files. DCode aperture are also similar to T Codes.
|
* files and GERBER files.
|
||||||
|
* DCode apertures are also similar to T Codes.
|
||||||
*/
|
*/
|
||||||
class EXCELLON_IMAGE : public GERBER_FILE_IMAGE
|
class EXCELLON_IMAGE : public GERBER_FILE_IMAGE
|
||||||
{
|
{
|
||||||
|
@ -141,6 +142,7 @@ public: EXCELLON_IMAGE( int layer ) :
|
||||||
m_State = READ_HEADER_STATE;
|
m_State = READ_HEADER_STATE;
|
||||||
m_SlotOn = false;
|
m_SlotOn = false;
|
||||||
m_RouteModeOn = false;
|
m_RouteModeOn = false;
|
||||||
|
m_hasFormat = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -82,6 +82,7 @@ DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES( PCB_EDIT_FRAME* aParen
|
||||||
m_delayedFocusGrid = nullptr;
|
m_delayedFocusGrid = nullptr;
|
||||||
m_delayedFocusRow = -1;
|
m_delayedFocusRow = -1;
|
||||||
m_delayedFocusColumn = -1;
|
m_delayedFocusColumn = -1;
|
||||||
|
m_initialFocus = false;
|
||||||
|
|
||||||
// Give an icon
|
// Give an icon
|
||||||
wxIcon icon;
|
wxIcon icon;
|
||||||
|
|
Loading…
Reference in New Issue