summaryrefslogtreecommitdiffstats
path: root/src/ui/tool/path-manipulator.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2011-02-05 02:04:47 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2011-02-05 02:04:47 +0000
commitfb749ad5edae38b062e00d1593ec0d306bac4ada (patch)
tree00b1bf94cf1ebf0f81980909d5d9f5e427aed560 /src/ui/tool/path-manipulator.cpp
parentProperly fix seltrans brokenness in 2Geom and pull updated files (diff)
downloadinkscape-fb749ad5edae38b062e00d1593ec0d306bac4ada.tar.gz
inkscape-fb749ad5edae38b062e00d1593ec0d306bac4ada.zip
Fix node tool brokenness resulting from a switch to runtime order
in 2Geom's BezierCurve (bzr r10035)
Diffstat (limited to 'src/ui/tool/path-manipulator.cpp')
-rw-r--r--src/ui/tool/path-manipulator.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/ui/tool/path-manipulator.cpp b/src/ui/tool/path-manipulator.cpp
index 47e28a788..0e5705ee4 100644
--- a/src/ui/tool/path-manipulator.cpp
+++ b/src/ui/tool/path-manipulator.cpp
@@ -1039,13 +1039,14 @@ void PathManipulator::_createControlPointsFromGeometry()
subpath->push_back(current_node);
}
// if this is a bezier segment, move handles appropriately
- if (Geom::CubicBezier const *cubic_bezier =
- dynamic_cast<Geom::CubicBezier const*>(&*cit))
+ // TODO: I don't know why the dynamic cast below doesn't want to work
+ // when I replace BezierCurve with CubicBezier. Might be a bug
+ // somewhere in pathv_to_linear_and_cubic_beziers
+ Geom::BezierCurve const *bezier = dynamic_cast<Geom::BezierCurve const*>(&*cit);
+ if (bezier && bezier->order() == 3)
{
- std::vector<Geom::Point> points = cubic_bezier->points();
-
- previous_node->front()->setPosition(points[1]);
- current_node ->back() ->setPosition(points[2]);
+ previous_node->front()->setPosition((*bezier)[1]);
+ current_node ->back() ->setPosition((*bezier)[2]);
}
previous_node = current_node;
}