summaryrefslogtreecommitdiffstats
path: root/src/ui/tool/path-manipulator.cpp
diff options
context:
space:
mode:
authorVinícius dos Santos Oliveira <vini.ipsmaker@gmail.com>2014-05-05 07:13:35 +0000
committerVinícius dos Santos Oliveira <vini.ipsmaker@gmail.com>2014-05-05 07:13:35 +0000
commit5a8b00f027b9eb3d4abb290d2ddf26d36d71cf80 (patch)
treef85f72eb8642eb842dcd02f20967e5bd2b8b95d1 /src/ui/tool/path-manipulator.cpp
parentupdate to trunk (diff)
downloadinkscape-5a8b00f027b9eb3d4abb290d2ddf26d36d71cf80.tar.gz
inkscape-5a8b00f027b9eb3d4abb290d2ddf26d36d71cf80.zip
Enabling path manipulator to comunicate if paths are bspline when
accessing const objects. This change was required to correctly show on the GUI whether or not a node was a bspline. (bzr r11950.8.1)
Diffstat (limited to 'src/ui/tool/path-manipulator.cpp')
-rw-r--r--src/ui/tool/path-manipulator.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/ui/tool/path-manipulator.cpp b/src/ui/tool/path-manipulator.cpp
index 487c31b10..3beeed049 100644
--- a/src/ui/tool/path-manipulator.cpp
+++ b/src/ui/tool/path-manipulator.cpp
@@ -1181,14 +1181,14 @@ void PathManipulator::_createControlPointsFromGeometry()
}
//determines if the trace has a bspline effect and the number of steps that it takes
-int PathManipulator::BSplineGetSteps(){
+int PathManipulator::BSplineGetSteps() const {
- LivePathEffect::LPEBSpline *lpe_bsp = NULL;
+ LivePathEffect::LPEBSpline const *lpe_bsp = NULL;
if (SP_IS_LPE_ITEM(_path) && _path->hasPathEffect()){
- Inkscape::LivePathEffect::Effect* thisEffect = SP_LPE_ITEM(_path)->getPathEffectOfType(Inkscape::LivePathEffect::BSPLINE);
+ Inkscape::LivePathEffect::Effect const *thisEffect = SP_LPE_ITEM(_path)->getPathEffectOfType(Inkscape::LivePathEffect::BSPLINE);
if(thisEffect){
- lpe_bsp = dynamic_cast<LivePathEffect::LPEBSpline*>(thisEffect->getLPEObj()->get_lpe());
+ lpe_bsp = dynamic_cast<LivePathEffect::LPEBSpline const*>(thisEffect->getLPEObj()->get_lpe());
}
}
int steps = 0;
@@ -1206,6 +1206,10 @@ bool PathManipulator::isBSpline(bool recalculate){
return _is_bspline;
}
+bool PathManipulator::isBSpline() const {
+ return BSplineGetSteps() > 0;
+}
+
// returns the corresponding strength to the position of the handlers
double PathManipulator::BSplineHandlePosition(Handle *h, Handle *h2){
using Geom::X;