Refactor Style::LoadFactoryDefaults.

This also fixes a bug where the hidden-edge style would be reset
to continuous when factory defaults are loaded.
pull/4/head
whitequark 2016-04-16 05:49:25 +00:00
parent a7f4d0fffc
commit 6b123f2d34
1 changed files with 1 additions and 16 deletions

View File

@ -106,22 +106,7 @@ void Style::LoadFactoryDefaults(void) {
const Default *d; const Default *d;
for(d = &(Defaults[0]); d->h.v; d++) { for(d = &(Defaults[0]); d->h.v; d++) {
Style *s = Get(d->h); Style *s = Get(d->h);
FillDefaultStyle(s, d);
s->color = d->color;
s->width = d->width;
s->widthAs = UNITS_AS_PIXELS;
s->textHeight = DEFAULT_TEXT_HEIGHT;
s->textHeightAs = UNITS_AS_PIXELS;
s->textOrigin = 0;
s->textAngle = 0;
s->visible = true;
s->exportable = true;
s->filled = false;
s->fillColor = RGBf(0.3, 0.3, 0.3);
s->stippleType = Style::STIPPLE_CONTINUOUS;
s->stippleScale = 15.0;
s->name = CnfPrefixToName(d->cnfPrefix);
s->zIndex = d->zIndex;
} }
SS.backgroundColor = RGBi(0, 0, 0); SS.backgroundColor = RGBi(0, 0, 0);
if(SS.bgImage.fromFile) MemFree(SS.bgImage.fromFile); if(SS.bgImage.fromFile) MemFree(SS.bgImage.fromFile);