summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2016-10-07 23:46:38 +0000
committerjabiertxof <info@marker.es>2016-10-07 23:46:38 +0000
commit3fb11a7eb8d066e2b16bddb98de9b4c03e28ba56 (patch)
tree3d9aa2103cfbb48808f7882188a60f0ec7cf738e /src
parentFix bug:1605334 FeImage X and Y position (diff)
downloadinkscape-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')
-rw-r--r--src/ui/dialog/livepatheffect-editor.h5
-rw-r--r--src/widgets/pencil-toolbar.cpp10
2 files changed, 9 insertions, 6 deletions
diff --git a/src/ui/dialog/livepatheffect-editor.h b/src/ui/dialog/livepatheffect-editor.h
index 8e9e66435..a7c749ef3 100644
--- a/src/ui/dialog/livepatheffect-editor.h
+++ b/src/ui/dialog/livepatheffect-editor.h
@@ -49,8 +49,6 @@ public:
void onSelectionModified(Inkscape::Selection *sel);
virtual void on_effect_selection_changed();
void setDesktop(SPDesktop *desktop);
- // void add_entry(const char* name );
- void effect_list_reload(SPLPEItem *lpeitem);
private:
@@ -66,6 +64,9 @@ private:
sigc::connection selection_changed_connection;
sigc::connection selection_modified_connection;
+ // void add_entry(const char* name );
+ void effect_list_reload(SPLPEItem *lpeitem);
+
void set_sensitize_all(bool sensitive);
void showParams(LivePathEffect::Effect& effect);
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)