Pcbnew: Force visibility of items which have no option in dialogs to controle this visibility, when reading the .kicad_brd file.
these options are used in GAL mode, but the usercannot control this visibility. So if the board file does not have these visibility flags set, the GAL never show them. Fix also a compil warning.
This commit is contained in:
parent
b74b2efff0
commit
bb50e141f4
|
@ -235,8 +235,7 @@ void STROKE_FONT::drawSingleLineText( const UTF8& aText )
|
|||
|
||||
double xOffset;
|
||||
VECTOR2D glyphSize( m_glyphSize );
|
||||
double overbar_italic_comp;
|
||||
bool last_had_overbar;
|
||||
double overbar_italic_comp = 0.0;
|
||||
|
||||
// Compute the text size
|
||||
VECTOR2D textSize = computeTextSize( aText );
|
||||
|
@ -280,7 +279,7 @@ void STROKE_FONT::drawSingleLineText( const UTF8& aText )
|
|||
// The overbar is indented inward at the beginning of an italicized section, but
|
||||
// must not be indented on subsequent letters to ensure that the bar segments
|
||||
// overlap.
|
||||
last_had_overbar = false;
|
||||
bool last_had_overbar = false;
|
||||
|
||||
for( UTF8::uni_iter chIt = aText.ubegin(), end = aText.uend(); chIt < end; ++chIt )
|
||||
{
|
||||
|
|
|
@ -436,6 +436,17 @@ enum PCB_VISIBLE
|
|||
END_PCB_VISIBLE_LIST // sentinel
|
||||
};
|
||||
|
||||
// Some elements do not have yet a visibility control
|
||||
// from a dialog, but have a visibility control flag.
|
||||
// Here is a mask to set them visible, to be sure they are displayed
|
||||
// after loading a board for instance
|
||||
#define MIN_VISIBILITY_MASK int( (1 << TRACKS_VISIBLE) +\
|
||||
(1 << PADS_VISIBLE) +\
|
||||
(1 << PADS_HOLES_VISIBLE) +\
|
||||
(1 << VIAS_HOLES_VISIBLE) +\
|
||||
(1 << DRC_VISIBLE) +\
|
||||
(1 << WORKSHEET) +\
|
||||
(1 << GP_OVERLAY) )
|
||||
|
||||
/**
|
||||
* Enum NETNAMES_VISIBLE
|
||||
|
|
|
@ -1138,7 +1138,7 @@ void PCB_PARSER::parseSetup() throw( IO_ERROR, PARSE_ERROR )
|
|||
break;
|
||||
|
||||
case T_visible_elements:
|
||||
designSettings.SetVisibleElements( parseHex() );
|
||||
designSettings.SetVisibleElements( parseHex() | MIN_VISIBILITY_MASK );
|
||||
NeedRIGHT();
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue