diff options
| author | bulia byak <buliabyak@gmail.com> | 2007-03-11 06:08:06 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2007-03-11 06:08:06 +0000 |
| commit | a2fc12e338c22e60059bdcba8ea1ec8021280446 (patch) | |
| tree | 408fd2c168246166050fefad2cab1f9c955cf6e8 /src/sp-style-elem.cpp | |
| parent | fix 1656169 (diff) | |
| download | inkscape-a2fc12e338c22e60059bdcba8ea1ec8021280446.tar.gz inkscape-a2fc12e338c22e60059bdcba8ea1ec8021280446.zip | |
fix 1491639
(bzr r2601)
Diffstat (limited to 'src/sp-style-elem.cpp')
| -rw-r--r-- | src/sp-style-elem.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sp-style-elem.cpp b/src/sp-style-elem.cpp index d713a518b..63a9bae38 100644 --- a/src/sp-style-elem.cpp +++ b/src/sp-style-elem.cpp @@ -4,6 +4,7 @@ #include "document.h" #include "sp-style-elem.h" #include "attributes.h" +#include "style.h" using Inkscape::XML::TEXT_NODE; static void sp_style_elem_init(SPStyleElem *style_elem); @@ -358,6 +359,15 @@ sp_style_elem_read_content(SPObject *const object) } cr_parser_destroy(parser); //object->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); + + // Style references via class= do not, and actually cannot, use autoupdating URIReferences. + // Therefore, if an object refers to a stylesheet which has not yet loaded when the object is being loaded + // (e.g. if the stylesheet is below or inside the object in XML), its class= has no effect (bug 1491639). + // Below is a partial hack that fixes this for a single case: when the <style> is a child of the object + // that uses a style from it. It just forces the parent of <style> to reread its style as soon as the stylesheet + // is fully loaded. Naturally, this won't work if the user of the stylesheet is its grandparent or precedent. + SPObject *parent = SP_OBJECT_PARENT (object); + sp_style_read_from_object(parent->style, parent); } /** |
