From 6b123f2d34de0eea6dd86355d7720fd442906460 Mon Sep 17 00:00:00 2001 From: whitequark Date: Sat, 16 Apr 2016 05:49:25 +0000 Subject: [PATCH] Refactor Style::LoadFactoryDefaults. This also fixes a bug where the hidden-edge style would be reset to continuous when factory defaults are loaded. --- src/style.cpp | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/style.cpp b/src/style.cpp index 1fde1ded..c793bcef 100644 --- a/src/style.cpp +++ b/src/style.cpp @@ -106,22 +106,7 @@ void Style::LoadFactoryDefaults(void) { const Default *d; for(d = &(Defaults[0]); d->h.v; d++) { Style *s = Get(d->h); - - 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; + FillDefaultStyle(s, d); } SS.backgroundColor = RGBi(0, 0, 0); if(SS.bgImage.fromFile) MemFree(SS.bgImage.fromFile);