diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2013-03-23 14:55:27 +0000 |
|---|---|---|
| committer | Jabiertxo Arraiza Zenotz <jtx@jtx.marker.es> | 2013-03-23 14:55:27 +0000 |
| commit | ece108cd1302b59ac5f41a38b6bb377093348147 (patch) | |
| tree | 7e0288ea4271b638c22c94c0eefe1b833504b0f5 /src/ui/tool/path-manipulator.cpp | |
| parent | Enabling Mesh (diff) | |
| parent | Adding mesh (diff) | |
| download | inkscape-ece108cd1302b59ac5f41a38b6bb377093348147.tar.gz inkscape-ece108cd1302b59ac5f41a38b6bb377093348147.zip | |
Mauro based feedbak added some fixes
(bzr r11950.1.68)
Diffstat (limited to 'src/ui/tool/path-manipulator.cpp')
| -rw-r--r-- | src/ui/tool/path-manipulator.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/ui/tool/path-manipulator.cpp b/src/ui/tool/path-manipulator.cpp index 8f6651dee..84e300306 100644 --- a/src/ui/tool/path-manipulator.cpp +++ b/src/ui/tool/path-manipulator.cpp @@ -161,7 +161,6 @@ PathManipulator::PathManipulator(MultiPathManipulator &mpm, SPPath *path, isBSpline = false; if(lpe_bsp){ isBSpline = true; - controlBSplineSteps = lpe_bsp->steps+1; } //BSpline End } @@ -842,8 +841,12 @@ void PathManipulator::scaleHandle(Node *n, int which, int dir, bool pixel) relpos *= ((rellen + length_change) / rellen); } h->setRelativePos(relpos); - update(); + if(isBSpline){ + double pos = BSplineHandlePosition(h); + h->setPosition(BSplineHandleReposition(h,pos)); + } + update(); gchar const *key = which < 0 ? "handle:scale:left" : "handle:scale:right"; _commit(_("Scale handle"), key); } @@ -867,7 +870,14 @@ void PathManipulator::rotateHandle(Node *n, int which, int dir, bool pixel) } h->setRelativePos(h->relativePos() * Geom::Rotate(angle)); + + if(isBSpline){ + double pos = BSplineHandlePosition(h); + h->setPosition(BSplineHandleReposition(h,pos)); + } + update(); + gchar const *key = which < 0 ? "handle:rotate:left" : "handle:rotate:right"; _commit(_("Rotate handle"), key); } @@ -1200,12 +1210,11 @@ void PathManipulator::_createControlPointsFromGeometry() } } +int PathManipulator::getSteps(){ + return lpe_bsp->steps+1; +} + double PathManipulator::BSplineHandlePosition(Handle *h){ - //BSpline - if(lpe_bsp){ - controlBSplineSteps = lpe_bsp->steps+1; - } - //BSpline End using Geom::X; using Geom::Y; double pos = 0; |
