From: nicholasbishop Date: Tue, 17 Jul 2007 02:27:39 +0000 (+0000) Subject: Filter effects dialog: X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9aadd756cef197bd6b06ce8b66a61f35c10bff1a;p=inkscape.git Filter effects dialog: * Prevent filter primitive connections to primitives that come after the selected primitive. --- diff --git a/src/filter-chemistry.cpp b/src/filter-chemistry.cpp index d9bf33d60..9317ed082 100644 --- a/src/filter-chemistry.cpp +++ b/src/filter-chemistry.cpp @@ -143,7 +143,7 @@ filter_add_primitive(SPFilter *filter, const NR::FilterPrimitiveType type) case NR::NR_FILTER_FLOOD: break; case NR::NR_FILTER_GAUSSIANBLUR: - repr->setAttribute("stddeviation", "1"); + repr->setAttribute("stdDeviation", "1"); break; case NR::NR_FILTER_IMAGE: break; diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp index 7263af448..18610f613 100644 --- a/src/ui/dialog/filter-effects-dialog.cpp +++ b/src/ui/dialog/filter-effects-dialog.cpp @@ -543,23 +543,27 @@ bool FilterEffectsDialog::PrimitiveList::on_button_release_event(GdkEventButton* int cx, cy; if(get_path_at_pos((int)e->x, (int)e->y, path, col, cx, cy)) { - const gchar *in_val; - target = (*_model->get_iter(path))[_columns.primitive]; - if(target == prim) { - in_val = 0; - } - else { - Inkscape::XML::Node *repr = SP_OBJECT_REPR(target); - // Make sure the target has a result - const gchar *gres = repr->attribute("result"); - if(!gres) { - const Glib::ustring result = "result" + - Glib::Ascii::dtostr(SP_FILTER(prim->parent)->_image_number_next); - repr->setAttribute("result", result.c_str()); - in_val = result.c_str(); + const gchar *in_val = 0; + Gtk::TreeIter target_iter = _model->get_iter(path); + target = (*target_iter)[_columns.primitive]; + + // Ensure that the target comes before the selected primitive + for(Gtk::TreeIter iter = _model->children().begin(); + iter != get_selection()->get_selected(); ++iter) { + if(iter == target_iter) { + Inkscape::XML::Node *repr = SP_OBJECT_REPR(target); + // Make sure the target has a result + const gchar *gres = repr->attribute("result"); + if(!gres) { + const Glib::ustring result = "result" + + Glib::Ascii::dtostr(SP_FILTER(prim->parent)->_image_number_next); + repr->setAttribute("result", result.c_str()); + in_val = result.c_str(); + } + else + in_val = gres; + break; } - else - in_val = gres; } if(_in_drag == 1)