From 026d2dcd2a7bae80241905cc32afa13fde5faa95 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Tue, 7 Feb 2017 14:34:51 +0100 Subject: Default style source to SP_STYLE_SRC_STYLE_PROP. Only set style_src on successful read. Fixed bugs: - https://launchpad.net/bugs/1662285 (bzr r15490) --- src/style-internal.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/style-internal.h b/src/style-internal.h index 69b03f503..154538833 100644 --- a/src/style-internal.h +++ b/src/style-internal.h @@ -121,7 +121,7 @@ public: inherits(inherits), set(false), inherit(false), - style_src(SP_STYLE_SRC_UNSET), + style_src(SP_STYLE_SRC_STYLE_PROP), // Default to property, see bug 1662285. style(NULL) {} @@ -132,7 +132,9 @@ public: virtual void readIfUnset( gchar const *str, SPStyleSrc const &source = SP_STYLE_SRC_STYLE_PROP ) { if ( !set ) { read( str ); - style_src = source; + if ( set ) { + style_src = source; + } } } -- cgit v1.2.3