diff options
| author | Ted Gould <ted@gould.cx> | 2012-11-25 19:41:24 +0000 |
|---|---|---|
| committer | Ted Gould <ted@gould.cx> | 2012-11-25 19:41:24 +0000 |
| commit | 18be0e5e3ab74823043e19dd6ea46c4b6b130e86 (patch) | |
| tree | a62925ec4473c1a21e1c99d1415f4cccab59b432 /src/attribute-rel-util.cpp | |
| parent | Getting all the filter headers (diff) | |
| parent | Fix for 1036059 : Keyboard shortcut editor (diff) | |
| download | inkscape-18be0e5e3ab74823043e19dd6ea46c4b6b130e86.tar.gz inkscape-18be0e5e3ab74823043e19dd6ea46c4b6b130e86.zip | |
Update to current trunk
(bzr r11804.1.8)
Diffstat (limited to 'src/attribute-rel-util.cpp')
| -rw-r--r-- | src/attribute-rel-util.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/attribute-rel-util.cpp b/src/attribute-rel-util.cpp index cf94c0c1e..38327b413 100644 --- a/src/attribute-rel-util.cpp +++ b/src/attribute-rel-util.cpp @@ -76,7 +76,14 @@ void sp_attribute_clean_recursive(Node *repr, unsigned int flags) { } for(Node *child=repr->firstChild() ; child ; child = child->next()) { - sp_attribute_clean_recursive( child, flags ); + + // Don't remove default css values if element is in <defs> or is a <symbol> + Glib::ustring element = child->name(); + unsigned int flags_temp = flags; + if( element.compare( "svg:defs" ) == 0 || element.compare( "svg:symbol" ) == 0 ) { + flags_temp &= ~(SP_ATTR_CLEAN_DEFAULT_WARN|SP_ATTR_CLEAN_DEFAULT_REMOVE); + } + sp_attribute_clean_recursive( child, flags_temp ); } } |
