Fixed some selection related bugs

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1751 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Alexis Deveria
2010-09-24 17:24:42 +00:00
parent 73b2b93bab
commit d826136331
2 changed files with 6 additions and 11 deletions

View File

@@ -1853,10 +1853,6 @@
$('#styleoverrides').text('');
$('.tool_button_current').removeClass('tool_button_current').addClass('tool_button');
$(button).addClass('tool_button_current').removeClass('tool_button');
// when a tool is selected, we should deselect any currently selected elements
if(button !== '#tool_select') {
svgCanvas.clearSelection();
}
return true;
};
@@ -2273,13 +2269,15 @@
};
var clickText = function(){
toolButtonClick('#tool_text');
svgCanvas.setMode('text');
if (toolButtonClick('#tool_text')) {
svgCanvas.setMode('text');
}
};
var clickPath = function(){
toolButtonClick('#tool_path');
svgCanvas.setMode('path');
if (toolButtonClick('#tool_path')) {
svgCanvas.setMode('path');
}
};
// Delete is a contextual tool that only appears in the ribbon if

View File

@@ -5342,9 +5342,6 @@ var getMouseTarget = this.getMouseTarget = function(evt) {
cleanupElement(element);
if(current_mode == "path") {
pathActions.toEditMode(element);
} else if (current_mode == "text" || current_mode == "image" || current_mode == "foreignObject") {
// keep us in the tool we were in unless it was a text or image element
addToSelection([element], true);
} else {
selectOnly([element], true);
}