diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2015-09-01 19:54:18 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2015-09-01 19:54:18 +0000 |
| commit | 67753b095a9a4c3ce0f22a3c63b5adb863c087ed (patch) | |
| tree | ca7f8f8f76585f15ced5570d2526b05503319894 /src | |
| parent | update to trunk (diff) | |
| download | inkscape-67753b095a9a4c3ce0f22a3c63b5adb863c087ed.tar.gz inkscape-67753b095a9a4c3ce0f22a3c63b5adb863c087ed.zip | |
Update to limit options to radius = 0, radious > 0 or both
(bzr r13645.1.118)
Diffstat (limited to 'src')
| -rw-r--r-- | src/live_effects/lpe-fillet-chamfer.cpp | 19 | ||||
| -rw-r--r-- | src/live_effects/lpe-fillet-chamfer.h | 3 |
2 files changed, 15 insertions, 7 deletions
diff --git a/src/live_effects/lpe-fillet-chamfer.cpp b/src/live_effects/lpe-fillet-chamfer.cpp index 24ed983fd..8c3b6e2f1 100644 --- a/src/live_effects/lpe-fillet-chamfer.cpp +++ b/src/live_effects/lpe-fillet-chamfer.cpp @@ -51,8 +51,8 @@ LPEFilletChamfer::LPEFilletChamfer(LivePathEffectObject *lpeobject) "use_knot_distance", &wr, this, false), hide_knots(_("Hide knots"), _("Hide knots"), "hide_knots", &wr, this, false), - ignore_radius_0(_("Ignore 0 radius knots"), _("Ignore 0 radius knots"), - "ignore_radius_0", &wr, this, false), + apply_no_radius(_("Apply changes if radius = 0"), _("Apply changes if radius = 0"), "apply_no_radius", &wr, this, true), + apply_with_radius(_("Apply changes if radius > 0"), _("Apply changes if radius > 0"), "apply_with_radius", &wr, this, true), helper_size(_("Helper size with direction:"), _("Helper size with direction"), "helper_size", &wr, this, 0), pointwise(NULL) @@ -65,7 +65,8 @@ LPEFilletChamfer::LPEFilletChamfer(LivePathEffectObject *lpeobject) registerParameter(&flexible); registerParameter(&use_knot_distance); registerParameter(&mirror_knots); - registerParameter(&ignore_radius_0); + registerParameter(&apply_no_radius); + registerParameter(&apply_with_radius); registerParameter(&only_selected); registerParameter(&hide_knots); @@ -273,7 +274,9 @@ void LPEFilletChamfer::updateAmount() it->amount = 0; continue; } - if (ignore_radius_0 && it->amount == 0) { + if ((!apply_no_radius && it->amount == 0) || + (!apply_with_radius && it->amount != 0)) + { continue; } boost::optional<size_t> previous = boost::none; @@ -306,7 +309,9 @@ void LPEFilletChamfer::updateChamferSteps() Geom::Piecewise<Geom::D2<Geom::SBasis> > pwd2 = pointwise->getPwd2(); for (std::vector<Satellite>::iterator it = satellites.begin(); it != satellites.end(); ++it) { - if (ignore_radius_0 && it->amount == 0) { + if ((!apply_no_radius && it->amount == 0) || + (!apply_with_radius && it->amount != 0)) + { continue; } if (only_selected) { @@ -328,7 +333,9 @@ void LPEFilletChamfer::updateSatelliteType(SatelliteType satellitetype) Geom::Piecewise<Geom::D2<Geom::SBasis> > pwd2 = pointwise->getPwd2(); for (std::vector<Satellite>::iterator it = satellites.begin(); it != satellites.end(); ++it) { - if (ignore_radius_0 && it->amount == 0) { + if ((!apply_no_radius && it->amount == 0) || + (!apply_with_radius && it->amount != 0)) + { continue; } if (only_selected) { diff --git a/src/live_effects/lpe-fillet-chamfer.h b/src/live_effects/lpe-fillet-chamfer.h index 804709342..638e8c6af 100644 --- a/src/live_effects/lpe-fillet-chamfer.h +++ b/src/live_effects/lpe-fillet-chamfer.h @@ -56,7 +56,8 @@ private: BoolParam only_selected; BoolParam use_knot_distance; BoolParam hide_knots; - BoolParam ignore_radius_0; + BoolParam apply_no_radius; + BoolParam apply_with_radius; ScalarParam helper_size; Pointwise *pointwise; |
