diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2016-11-02 19:53:08 +0000 |
|---|---|---|
| committer | jabiertxof <info@marker.es> | 2016-11-02 19:53:08 +0000 |
| commit | 1745fbc8feec44b064ef92cb0f1f78789342e311 (patch) | |
| tree | e42603fab21cc1df3308b09bd297adc2e2ea53e8 /src/ui/dialog/livepatheffect-editor.cpp | |
| parent | Update branding folder (diff) | |
| download | inkscape-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/ui/dialog/livepatheffect-editor.cpp')
| -rw-r--r-- | src/ui/dialog/livepatheffect-editor.cpp | 12 |
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; |
