From 798cda4430354143e90fb7ce81c3593a6dc24bc5 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah <> Date: Wed, 13 Jul 2016 08:12:57 +0530 Subject: Propagate changes to object tree with changes in style element (bzr r14949.1.46) --- src/sp-object.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/sp-object.cpp') diff --git a/src/sp-object.cpp b/src/sp-object.cpp index d1659eedc..6d36ec833 100644 --- a/src/sp-object.cpp +++ b/src/sp-object.cpp @@ -1043,7 +1043,9 @@ Inkscape::XML::Node* SPObject::write(Inkscape::XML::Document *doc, Inkscape::XML } if (style) { - Glib::ustring s = style->write(SP_STYLE_FLAG_IFSET); + // Write if property set by style attribute in this object + Glib::ustring s = + style->write(SP_STYLE_FLAG_IFSET & SP_STYLE_FLAG_IFSRC, SP_STYLE_SRC_STYLE_PROP); // Check for valid attributes. This may be time consuming. // It is useful, though, for debugging Inkscape code. -- cgit v1.2.3 From 2fe2bf0ac3026964cbf3c76c357a37f2ab4341ef Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Sun, 5 Feb 2017 17:57:48 +0100 Subject: Fix styling breakage from r15471. (bzr r15478) --- src/sp-object.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sp-object.cpp') diff --git a/src/sp-object.cpp b/src/sp-object.cpp index cc862417d..7807703f6 100644 --- a/src/sp-object.cpp +++ b/src/sp-object.cpp @@ -1063,7 +1063,7 @@ Inkscape::XML::Node* SPObject::write(Inkscape::XML::Document *doc, Inkscape::XML if (style) { // Write if property set by style attribute in this object Glib::ustring s = - style->write(SP_STYLE_FLAG_IFSET & SP_STYLE_FLAG_IFSRC, SP_STYLE_SRC_STYLE_PROP); + style->write(SP_STYLE_FLAG_IFSET | SP_STYLE_FLAG_IFSRC, SP_STYLE_SRC_STYLE_PROP); // Check for valid attributes. This may be time consuming. // It is useful, though, for debugging Inkscape code. -- cgit v1.2.3 From 52059c7c7f059a0928efd48d0ef545dabc30a3a7 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Fri, 10 Feb 2017 11:06:54 +0100 Subject: Do not delete presentation attributes. Styling source is now tracked and not automatically converted to properties in a style attribute. Fixed bugs: - https://launchpad.net/bugs/1663511 (bzr r15500) --- src/sp-object.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/sp-object.cpp') diff --git a/src/sp-object.cpp b/src/sp-object.cpp index 7807703f6..9f15935ac 100644 --- a/src/sp-object.cpp +++ b/src/sp-object.cpp @@ -1105,7 +1105,10 @@ Inkscape::XML::Node* SPObject::write(Inkscape::XML::Document *doc, Inkscape::XML * possibly we should write property attributes instead of a style * attribute. */ - sp_style_unset_property_attrs (this); + // With the changes to preserves style source this is no longer needed + // and the above comment no longer applies. I leave it here until these + // change are well tested. + // sp_style_unset_property_attrs (this); } #ifdef OBJECT_TRACE -- cgit v1.2.3