From f08ed827d991255eb985b1cb1e04d22d251c3c52 Mon Sep 17 00:00:00 2001 From: Alexis Deveria Date: Mon, 31 May 2010 19:30:02 +0000 Subject: [PATCH] Fixed issue 567 and similar bug for textedit mode git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1584 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svgcanvas.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index 2ec17a60..75672216 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -3957,7 +3957,7 @@ function BatchCommand(text) { }()); var textActions = canvas.textActions = function() { - var curtext; + var curtext, current_text; var textinput; var cursor; var selblock; @@ -4180,11 +4180,12 @@ function BatchCommand(text) { return { select: function(target, x, y) { - if (curtext == target) { + if (current_text == target) { + curtext = target; textActions.toEditMode(x, y); } // going into pathedit mode else { - curtext = target; + current_text = target; } }, start: function(elem) { @@ -4278,6 +4279,7 @@ function BatchCommand(text) { $(textinput).blur(hideCursor); }, clear: function() { + current_text = null; if(current_mode == "textedit") { textActions.toSelectMode(); } @@ -5677,6 +5679,7 @@ function BatchCommand(text) { }, clear: function(remove) { + current_path = null; if (current_mode == "path" && current_path_pts.length > 0) { var elem = getElem(getId()); $(getElem("path_stretch_line")).remove();