From 1a53fb6061688d3204e48d8617e9fed50a04b204 Mon Sep 17 00:00:00 2001 From: Pushkar Joshi Date: Fri, 6 Apr 2012 11:41:21 -0700 Subject: Don't update the plane matrix of subpaths that already have a plane matrix --- js/tools/PenTool.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'js/tools/PenTool.js') diff --git a/js/tools/PenTool.js b/js/tools/PenTool.js index f310208e..96702756 100755 --- a/js/tools/PenTool.js +++ b/js/tools/PenTool.js @@ -410,10 +410,12 @@ exports.PenTool = Montage.create(ShapeTool, { ShowSelectedSubpath:{ value: function() { if (this._selectedSubpath){ - this._selectedSubpath.setPlaneMatrix(this._penPlaneMat); - var planeMatInv = glmat4.inverse( this._penPlaneMat, [] ); - this._selectedSubpath.setPlaneMatrixInverse(planeMatInv); - this._selectedSubpath.setDragPlane(this._dragPlane); + if (!this._selectedSubpath.getPlaneMatrix()) { + this._selectedSubpath.setPlaneMatrix(this._penPlaneMat); + var planeMatInv = glmat4.inverse( this._penPlaneMat, [] ); + this._selectedSubpath.setPlaneMatrixInverse(planeMatInv); + this._selectedSubpath.setDragPlane(this._dragPlane); + } this._selectedSubpath.createSamples(); //dirty bit is checked here this._selectedSubpath.buildLocalCoord(); //local dirty bit is checked here -- cgit v1.2.3