diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2014-03-14 17:35:31 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2014-03-14 17:35:31 +0000 |
| commit | f9d1d1a8a33eee7fd7977361d2d559697f0fb56d (patch) | |
| tree | d8e937b99b8ee1ca384d10113a6cfcc7704514c4 | |
| parent | update to trunk (diff) | |
| download | inkscape-f9d1d1a8a33eee7fd7977361d2d559697f0fb56d.tar.gz inkscape-f9d1d1a8a33eee7fd7977361d2d559697f0fb56d.zip | |
disabling cache approach for isBSpline function, pointed by VinÃcius
(bzr r11950.1.296)
| -rw-r--r-- | src/ui/tool/path-manipulator.cpp | 15 | ||||
| -rw-r--r-- | src/ui/tool/path-manipulator.h | 2 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/ui/tool/path-manipulator.cpp b/src/ui/tool/path-manipulator.cpp index f8cc58e3b..adc70bc38 100644 --- a/src/ui/tool/path-manipulator.cpp +++ b/src/ui/tool/path-manipulator.cpp @@ -145,7 +145,7 @@ PathManipulator::PathManipulator(MultiPathManipulator &mpm, SPPath *path, sigc::hide( sigc::mem_fun(*this, &PathManipulator::_updateOutlineOnZoomChange))); _createControlPointsFromGeometry(); - isBSpline(true); + isBSpline(/*true*/); } PathManipulator::~PathManipulator() @@ -1201,11 +1201,12 @@ int PathManipulator::BSplineGetSteps(){ } // determines if the trace has bspline effect -bool PathManipulator::isBSpline(bool recalculate){ - static int BSplineSteps = this->BSplineGetSteps(); - if(recalculate){ - BSplineSteps = this->BSplineGetSteps(); - } +bool PathManipulator::isBSpline(/*bool recalculate*/){ + /*static*/ int BSplineSteps = this->BSplineGetSteps(); + // Taking out the static dont need this part + //if(recalculate){ + // BSplineSteps = this->BSplineGetSteps(); + //} return BSplineSteps > 0; } @@ -1282,7 +1283,7 @@ void PathManipulator::BSplineNodeHandlesReposition(Node *n){ void PathManipulator::_createGeometryFromControlPoints(bool alert_LPE) { Geom::PathBuilder builder; - isBSpline(true); + isBSpline(/*true*/); for (std::list<SubpathPtr>::iterator spi = _subpaths.begin(); spi != _subpaths.end(); ) { SubpathPtr subpath = *spi; if (subpath->empty()) { diff --git a/src/ui/tool/path-manipulator.h b/src/ui/tool/path-manipulator.h index 594f56ff9..67590832d 100644 --- a/src/ui/tool/path-manipulator.h +++ b/src/ui/tool/path-manipulator.h @@ -106,7 +106,7 @@ private: typedef boost::shared_ptr<NodeList> SubpathPtr; void _createControlPointsFromGeometry(); - bool isBSpline(bool recalculate = true); + bool isBSpline(/*bool recalculate = true*/); double BSplineHandlePosition(Handle *h); Geom::Point BSplineHandleReposition(Handle *h); Geom::Point BSplineHandleReposition(Handle *h,double pos); |
