From 977a312f0979f34215f3c0ba5332d85b257d271c Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Thu, 10 Jul 2014 21:22:59 +0200 Subject: Fix crash when ungrouping a group that has a filter applied to it Fixed bugs: - https://launchpad.net/bugs/1323849 (bzr r13449) --- src/style-internal.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/style-internal.cpp') diff --git a/src/style-internal.cpp b/src/style-internal.cpp index c686a1807..d0e65a19a 100644 --- a/src/style-internal.cpp +++ b/src/style-internal.cpp @@ -1440,7 +1440,7 @@ SPIFilter::cascade( const SPIBase* const parent ) { void SPIFilter::merge( const SPIBase* const parent ) { if( const SPIFilter* p = dynamic_cast(parent) ) { - // The "correct" thing to due is to combine the filter primitives. + // The "correct" thing to do is to combine the filter primitives. // The next best thing is to keep any filter on this object. If there // is no filter on this object, then use any filter on the parent. if( (!set || inherit) && p->href && p->href->getObject() ) { // is the getObject() needed? @@ -1453,9 +1453,11 @@ SPIFilter::merge( const SPIBase* const parent ) { } } else { // If we don't have an href, create it - if( &style->document ) { // FIXME + if( style->document ) { // FIXME href = new SPFilterReference(style->document); //href->changedSignal().connect(sigc::bind(sigc::ptr_fun(sp_style_filter_ref_changed), style)); + } else if (style->object) { + href = new SPFilterReference(style->object); } } if( href ) { -- cgit v1.2.3 From 70fbc57aa2ae064f92fbc4e6c8950b5c90e4ccac Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Tue, 15 Jul 2014 16:07:09 -0700 Subject: Warnings cleaup. (bzr r13454) --- src/style-internal.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/style-internal.cpp') diff --git a/src/style-internal.cpp b/src/style-internal.cpp index d0e65a19a..6a56d75c0 100644 --- a/src/style-internal.cpp +++ b/src/style-internal.cpp @@ -1390,9 +1390,8 @@ SPIFilter::read( gchar const *str ) { } } -const Glib::ustring -SPIFilter::write( guint const flags, SPIBase const *const base) const { - +const Glib::ustring SPIFilter::write( guint const flags, SPIBase const *const /*base*/) const +{ // TODO: fix base //SPILength const *const my_base = dynamic_cast(base); if ( (flags & SP_STYLE_FLAG_ALWAYS) || @@ -1923,9 +1922,8 @@ SPIFont::read( gchar const *str ) { } } -const Glib::ustring -SPIFont::write( guint const flags, SPIBase const *const base) const { - +const Glib::ustring SPIFont::write( guint const /*flags*/, SPIBase const *const /*base*/) const +{ // At the moment, do nothing. We could add a preference to write out // 'font' shorthand rather than longhand properties. -- cgit v1.2.3