diff --git a/common/gal/stroke_font.cpp b/common/gal/stroke_font.cpp index 205c2c9316..3fee7d7a74 100644 --- a/common/gal/stroke_font.cpp +++ b/common/gal/stroke_font.cpp @@ -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 ) { diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index d393766693..7415e42ffd 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -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 diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 5045afbbdc..c9a2e427fb 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -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;