From: kiirala Date: Thu, 24 Jul 2008 15:06:47 +0000 (+0000) Subject: Fixed regression: changing blend mode in layers dialog didn't work X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=27802dfd0ec79acd49c0bf8a3b6cff62f9fd576c;p=inkscape.git Fixed regression: changing blend mode in layers dialog didn't work --- diff --git a/src/filter-chemistry.cpp b/src/filter-chemistry.cpp index 90151d6d2..cefb3227d 100644 --- a/src/filter-chemistry.cpp +++ b/src/filter-chemistry.cpp @@ -8,7 +8,7 @@ * bulia byak * Niko Kiirala * - * Copyright (C) 2006,2007 authors + * Copyright (C) 2006-2008 authors * * Released under GNU GPL, read the file 'COPYING' for more information */ diff --git a/src/ui/widget/object-composite-settings.cpp b/src/ui/widget/object-composite-settings.cpp index 7f0f4767b..088af176a 100644 --- a/src/ui/widget/object-composite-settings.cpp +++ b/src/ui/widget/object-composite-settings.cpp @@ -4,8 +4,9 @@ * Authors: * Bryce W. Harrington * Gustav Broberg + * Niko Kiirala * - * Copyright (C) 2004--2007 Authors + * Copyright (C) 2004--2008 Authors * * Released under GNU GPL, read the file 'COPYING' for more information */ @@ -122,7 +123,7 @@ ObjectCompositeSettings::_blendBlurValueChanged() radius = 0; } - //const Glib::ustring blendmode = _fe_cb.get_blend_mode(); + const Glib::ustring blendmode = _fe_cb.get_blend_mode(); //apply created filter to every selected item for (StyleSubject::iterator i = _subject->begin() ; i != _subject->end() ; ++i ) { @@ -134,11 +135,16 @@ ObjectCompositeSettings::_blendBlurValueChanged() SPStyle *style = SP_OBJECT_STYLE(item); g_assert(style != NULL); + if (blendmode != "normal") { + SPFilter *filter = new_filter_simple_from_item(document, item, blendmode.c_str(), radius); + sp_style_set_property_url(item, "filter", filter, false); + } + if (radius == 0 && item->style->filter.set && filter_is_single_gaussian_blur(SP_FILTER(item->style->getFilter()))) { remove_filter(item, false); } - else { + else if (radius != 0) { SPFilter *filter = modify_filter_gaussian_blur_from_item(document, item, radius); sp_style_set_property_url(item, "filter", filter, false); }