Made selection of last created element remain when switching to select tool

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1706 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Alexis Deveria 2010-09-09 20:10:34 +00:00
parent 9ed94bfc28
commit a6a2e7c469
2 changed files with 3 additions and 2 deletions

View File

@ -1787,7 +1787,9 @@
$('.tool_button_current').removeClass('tool_button_current').addClass('tool_button'); $('.tool_button_current').removeClass('tool_button_current').addClass('tool_button');
$(button).addClass('tool_button_current').removeClass('tool_button'); $(button).addClass('tool_button_current').removeClass('tool_button');
// when a tool is selected, we should deselect any currently selected elements // when a tool is selected, we should deselect any currently selected elements
svgCanvas.clearSelection(); if(button !== '#tool_select') {
svgCanvas.clearSelection();
}
return true; return true;
}; };

View File

@ -9271,7 +9271,6 @@ this.getMode = function() {
this.setMode = function(name) { this.setMode = function(name) {
pathActions.clear(true); pathActions.clear(true);
textActions.clear(); textActions.clear();
cur_properties = (selectedElements[0] && selectedElements[0].nodeName == 'text') ? cur_text : cur_shape; cur_properties = (selectedElements[0] && selectedElements[0].nodeName == 'text') ? cur_text : cur_shape;
current_mode = name; current_mode = name;
}; };