diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2016-10-07 23:46:38 +0000 |
|---|---|---|
| committer | jabiertxof <info@marker.es> | 2016-10-07 23:46:38 +0000 |
| commit | 3fb11a7eb8d066e2b16bddb98de9b4c03e28ba56 (patch) | |
| tree | 3d9aa2103cfbb48808f7882188a60f0ec7cf738e /src/widgets/pencil-toolbar.cpp | |
| parent | Fix bug:1605334 FeImage X and Y position (diff) | |
| download | inkscape-3fb11a7eb8d066e2b16bddb98de9b4c03e28ba56.tar.gz inkscape-3fb11a7eb8d066e2b16bddb98de9b4c03e28ba56.zip | |
Fix bug:1630796 on flatten button. Attemp 2
Fixed bugs:
- https://launchpad.net/bugs/1630796
(bzr r15152)
Diffstat (limited to 'src/widgets/pencil-toolbar.cpp')
| -rw-r--r-- | src/widgets/pencil-toolbar.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/widgets/pencil-toolbar.cpp b/src/widgets/pencil-toolbar.cpp index b177c42b4..c3a2ab946 100644 --- a/src/widgets/pencil-toolbar.cpp +++ b/src/widgets/pencil-toolbar.cpp @@ -239,8 +239,9 @@ static void sp_simplify_flatten(GtkWidget * /*widget*/, GObject *obj) { SPDesktop *desktop = static_cast<SPDesktop *>(g_object_get_data(obj, "desktop")); auto selected = desktop->getSelection()->items(); + SPLPEItem* lpeitem = NULL; for (auto it(selected.begin()); it != selected.end(); ++it){ - SPLPEItem* lpeitem = dynamic_cast<SPLPEItem*>(*it); + lpeitem = dynamic_cast<SPLPEItem*>(*it); if (lpeitem && lpeitem->hasPathEffect()){ PathEffectList lpelist = lpeitem->getEffectList(); PathEffectList::iterator i; @@ -261,16 +262,17 @@ static void sp_simplify_flatten(GtkWidget * /*widget*/, GObject *obj) lpeitem->removeCurrentPathEffect(false); shape->setCurve(c,0); } - Inkscape::UI::Dialog::LivePathEffectEditor *lpeeditor = new Inkscape::UI::Dialog::LivePathEffectEditor(); - lpeeditor->effect_list_reload(lpeitem); break; - } } } } } } + if (lpeitem) { + desktop->getSelection()->remove(lpeitem->getRepr()); + desktop->getSelection()->add(lpeitem->getRepr()); + } } static void sp_pencil_tb_tolerance_value_changed(GtkAdjustment *adj, GObject *tbl) |
