summaryrefslogtreecommitdiffstats
path: root/src/style-internal.cpp
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2018-10-01 13:53:15 +0000
committerMartin Owens <doctormo@gmail.com>2018-10-01 13:53:15 +0000
commit043b8f06bc6e8f3e2a788a5ee5122d05ea38009f (patch)
treef9dcc96ab7bb8d572d62daf1cafee6677d144142 /src/style-internal.cpp
parentImprovements to transforms in LPE (diff)
downloadinkscape-043b8f06bc6e8f3e2a788a5ee5122d05ea38009f.tar.gz
inkscape-043b8f06bc6e8f3e2a788a5ee5122d05ea38009f.zip
Fix the object-to-path bug by adding back the SPIBase check.
Diffstat (limited to 'src/style-internal.cpp')
-rw-r--r--src/style-internal.cpp5
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() + ";");