From 043b8f06bc6e8f3e2a788a5ee5122d05ea38009f Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Mon, 1 Oct 2018 09:53:15 -0400 Subject: Fix the object-to-path bug by adding back the SPIBase check. --- src/style-internal.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/style-internal.cpp') 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(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() + ";"); -- cgit v1.2.3