diff options
| author | Martin Owens <doctormo@gmail.com> | 2018-10-01 13:53:15 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2018-10-01 13:53:15 +0000 |
| commit | 043b8f06bc6e8f3e2a788a5ee5122d05ea38009f (patch) | |
| tree | f9dcc96ab7bb8d572d62daf1cafee6677d144142 /src | |
| parent | Improvements to transforms in LPE (diff) | |
| download | inkscape-043b8f06bc6e8f3e2a788a5ee5122d05ea38009f.tar.gz inkscape-043b8f06bc6e8f3e2a788a5ee5122d05ea38009f.zip | |
Fix the object-to-path bug by adding back the SPIBase check.
Diffstat (limited to 'src')
| -rw-r--r-- | src/style-internal.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/style-internal.cpp b/src/style-internal.cpp index 00d7d64c2..0c2ff0fa0 100644 --- a/src/style-internal.cpp +++ b/src/style-internal.cpp @@ -70,8 +70,11 @@ inline bool should_write( guint const flags, bool set, bool dfp, bool src) { const Glib::ustring SPIBase::write(guint const flags, SPStyleSrc const &style_src_req, SPIBase const *const base) const { + // Is this class different from the SPIBase given, this is used in Object-to-Path + SPIBase const *const my_base = dynamic_cast<const SPIBase*>(base); + bool dfp = (!inherits || !my_base || (my_base != this)); // Different from parent bool src = (style_src_req == style_src || !(flags & SP_STYLE_FLAG_IFSRC)); - if (should_write(flags, set, !inherits, src)) { + if (should_write(flags, set, dfp, src)) { auto value = this->get_value(); if ( !value.empty() ) { return (name + ":" + value + important_str() + ";"); |
