X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fextension%2Finternal%2Fbluredge.cpp;h=678e492ee414257cf36f5582e42b990323da6143;hb=b9504ae85556942c4e973a5619707c16859ad729;hp=3ae78b91fcbdb23750acc6c7932dbb6353649c8b;hpb=a6988c83e9af8585b15319bf204be9382260b739;p=inkscape.git diff --git a/src/extension/internal/bluredge.cpp b/src/extension/internal/bluredge.cpp index 3ae78b91f..678e492ee 100644 --- a/src/extension/internal/bluredge.cpp +++ b/src/extension/internal/bluredge.cpp @@ -12,6 +12,7 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ +#include #include "desktop.h" #include "selection.h" #include "helper/action.h" @@ -65,16 +66,13 @@ BlurEdge::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View items.insert >(items.end(), selection->itemList(), NULL); selection->clear(); - std::list new_items; for(std::list::iterator item = items.begin(); item != items.end(); item++) { SPItem * spitem = *item; - Inkscape::XML::Node * new_items[steps]; + std::vector new_items(steps); Inkscape::XML::Node * new_group = sp_repr_new("svg:g"); (SP_OBJECT_REPR(spitem)->parent())->appendChild(new_group); - /** \todo Need to figure out how to get from XML::Node to SPItem */ - /* new_items.push_back(); */ double orig_opacity = sp_repr_css_double_property(sp_repr_css_attr(SP_OBJECT_REPR(spitem), "style"), "opacity", 1.0); char opacity_string[64]; @@ -99,8 +97,7 @@ BlurEdge::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View offset *= -1.0; prefs_set_double_attribute("options.defaultoffsetwidth", "value", offset); sp_action_perform(Inkscape::Verb::get(SP_VERB_SELECTION_INSET)->get_action(document), NULL); - } else if (offset == 0.0) { - } else { + } else if (offset > 0.0) { prefs_set_double_attribute("options.defaultoffsetwidth", "value", offset); sp_action_perform(Inkscape::Verb::get(SP_VERB_SELECTION_OFFSET)->get_action(document), NULL); } @@ -114,7 +111,6 @@ BlurEdge::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View selection->clear(); selection->add(items.begin(), items.end()); - selection->add(new_items.begin(), new_items.end()); return; } @@ -122,7 +118,7 @@ BlurEdge::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View Gtk::Widget * BlurEdge::prefs_effect(Inkscape::Extension::Effect * module, Inkscape::UI::View::View * view) { - return module->autogui(); + return module->autogui(NULL, NULL); } #include "clear-n_.h" @@ -134,12 +130,12 @@ BlurEdge::init (void) "\n" "" N_("Blur Edge") "\n" "org.inkscape.effect.bluredge\n" - "1.0\n" - "11\n" + "1.0\n" + "11\n" "\n" "all\n" "\n" - "\n" + "\n" "\n" "\n" "\n" , new BlurEdge());