summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2016-11-02 19:53:08 +0000
committerjabiertxof <info@marker.es>2016-11-02 19:53:08 +0000
commit1745fbc8feec44b064ef92cb0f1f78789342e311 (patch)
treee42603fab21cc1df3308b09bd297adc2e2ea53e8 /src
parentUpdate branding folder (diff)
downloadinkscape-1745fbc8feec44b064ef92cb0f1f78789342e311.tar.gz
inkscape-1745fbc8feec44b064ef92cb0f1f78789342e311.zip
Fix bug:1013141 crash deleting LPE
Fixed bugs: - https://launchpad.net/bugs/1013141 (bzr r15200)
Diffstat (limited to 'src')
-rw-r--r--src/ui/dialog/livepatheffect-editor.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/ui/dialog/livepatheffect-editor.cpp b/src/ui/dialog/livepatheffect-editor.cpp
index b97b0e63a..4d60d610e 100644
--- a/src/ui/dialog/livepatheffect-editor.cpp
+++ b/src/ui/dialog/livepatheffect-editor.cpp
@@ -547,7 +547,17 @@ void LivePathEffectEditor::on_effect_selection_changed()
if (lperef && current_lpeitem && current_lperef != lperef) {
//The last condition ignore Gtk::TreeModel may occasionally be changed emitted when nothing has happened
- if (lperef->lpeobject->get_lpe()) {
+ Glib::RefPtr<Gtk::TreeModel> model = effectlist_view.get_model();
+ Gtk::TreeNodeChildren childs = model->children();
+ Gtk::TreeNodeChildren::iterator row;
+ bool removed = true;
+ for( row = childs.begin() ; row!=childs.end(); ++row)
+ {
+ if ( (*row)[columns.lperef] == current_lperef ) {
+ removed = false;
+ }
+ }
+ if (!removed && lperef->lpeobject->get_lpe()) {
lpe_list_locked = true; // prevent reload of the list which would lose selection
current_lpeitem->setCurrentPathEffect(lperef);
current_lperef = lperef;