diff --git a/area.js b/area.js index 4eb284b..6415d6f 100644 --- a/area.js +++ b/area.js @@ -884,8 +884,12 @@ var DrawingArea = new Lang.Class({ // A priori there is nothing to stop, except transformations, if there is no current element. // 'force' argument is passed when leaving drawing mode to ensure all is clean, as a workaround for possible bugs. _stopAll: function(force) { - if (this.grabbedElement) + if (this.grabbedElement) { this._stopTransforming(); + this.grabbedElement = null; + this.grabbedElementLocked = null; + this.updatePointerCursor(); + } if (!this.currentElement && !force) return; diff --git a/elements.js b/elements.js index 2bbcaeb..5890187 100644 --- a/elements.js +++ b/elements.js @@ -577,11 +577,12 @@ const _DrawingElement = new Lang.Class({ }, stopTransformation: function() { + this.showSymmetryElement = false; + // Clean transformations let transformation = this.lastTransformation; - - if (transformation.type == Transformations.REFLECTION || transformation.type == Transformations.INVERSION) - this.showSymmetryElement = false; + if (!transformation) + return; if (transformation.type == Transformations.REFLECTION && getNearness([transformation.startX, transformation.startY], [transformation.endX, transformation.endY], MIN_REFLECTION_LINE_LENGTH) ||