diff options
| author | Nicholas Bishop <nicholasbishop@gmail.com> | 2007-07-17 02:27:39 +0000 |
|---|---|---|
| committer | nicholasbishop <nicholasbishop@users.sourceforge.net> | 2007-07-17 02:27:39 +0000 |
| commit | 8b925da73764edcf21ac8fd46ca79c6ead94f8f5 (patch) | |
| tree | 3bf14763354499d33e2ce21f1fa26c6f4f345db3 /src | |
| parent | Add two newly 'discovered' translators, sorry guys. (diff) | |
| download | inkscape-8b925da73764edcf21ac8fd46ca79c6ead94f8f5.tar.gz inkscape-8b925da73764edcf21ac8fd46ca79c6ead94f8f5.zip | |
Filter effects dialog:
* Prevent filter primitive connections to primitives that come after the selected primitive.
(bzr r3258)
Diffstat (limited to 'src')
| -rw-r--r-- | src/filter-chemistry.cpp | 2 | ||||
| -rw-r--r-- | src/ui/dialog/filter-effects-dialog.cpp | 36 |
2 files changed, 21 insertions, 17 deletions
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) |
