summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-07-25 19:12:04 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-07-25 19:12:04 +0000
commit2416766e3b71f22adb6943495458697b1b958a08 (patch)
tree08e3ccea4298361ea78dd79ba818946f620f198c /src
parentfix icons (diff)
downloadinkscape-2416766e3b71f22adb6943495458697b1b958a08.tar.gz
inkscape-2416766e3b71f22adb6943495458697b1b958a08.zip
Removes extra unnecesary code pointed by Nathan Hurst
(bzr r13973.1.19)
Diffstat (limited to 'src')
-rw-r--r--src/widgets/pencil-toolbar.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/widgets/pencil-toolbar.cpp b/src/widgets/pencil-toolbar.cpp
index f2214bf49..4b177d3ad 100644
--- a/src/widgets/pencil-toolbar.cpp
+++ b/src/widgets/pencil-toolbar.cpp
@@ -247,20 +247,18 @@ static void sp_pencil_tb_tolerance_value_changed(GtkAdjustment *adj, GObject *tb
g_object_set_data( tbl, "freeze", GINT_TO_POINTER(FALSE) );
SPDesktop *desktop = static_cast<SPDesktop *>(g_object_get_data(tbl, "desktop"));
std::vector<SPItem *> selected = desktop->getSelection()->itemList();
- if(!selected.empty()){
- for (std::vector<SPItem *>::iterator it(selected.begin()); it != selected.end(); ++it){
- SPLPEItem* lpeitem = dynamic_cast<SPLPEItem*>(*it);
- if (lpeitem && lpeitem->hasPathEffect()){
- Inkscape::LivePathEffect::Effect* thisEffect = lpeitem->getPathEffectOfType(Inkscape::LivePathEffect::SIMPLIFY);
- if(thisEffect){
- Inkscape::LivePathEffect::LPESimplify *lpe = dynamic_cast<Inkscape::LivePathEffect::LPESimplify*>(thisEffect->getLPEObj()->get_lpe());
- if (lpe) {
- double tol = prefs->getDoubleLimited("/tools/freehand/pencil/tolerance", 10.0, 1.0, 100.0);
- tol = tol/(100.0*(101.0-tol));
- std::ostringstream ss;
- ss << tol;
- lpe->getRepr()->setAttribute("threshold", ss.str());
- }
+ for (std::vector<SPItem *>::iterator it(selected.begin()); it != selected.end(); ++it){
+ SPLPEItem* lpeitem = dynamic_cast<SPLPEItem*>(*it);
+ if (lpeitem && lpeitem->hasPathEffect()){
+ Inkscape::LivePathEffect::Effect* thisEffect = lpeitem->getPathEffectOfType(Inkscape::LivePathEffect::SIMPLIFY);
+ if(thisEffect){
+ Inkscape::LivePathEffect::LPESimplify *lpe = dynamic_cast<Inkscape::LivePathEffect::LPESimplify*>(thisEffect->getLPEObj()->get_lpe());
+ if (lpe) {
+ double tol = prefs->getDoubleLimited("/tools/freehand/pencil/tolerance", 10.0, 1.0, 100.0);
+ tol = tol/(100.0*(101.0-tol));
+ std::ostringstream ss;
+ ss << tol;
+ lpe->getRepr()->setAttribute("threshold", ss.str());
}
}
}