Fix Issue 172: ensure the selector manager is re-initialized upon clearing the document

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@556 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Jeff Schiller 2009-09-04 06:36:37 +00:00
parent 701549a404
commit 14f42e8621
1 changed files with 5 additions and 4 deletions

View File

@ -411,8 +411,8 @@ function BatchCommand(text) {
// local reference to this object
var mgr = this;
// private function
var initGroup = function() {
this.initGroup = function() {
mgr.selectorParentGroup = addSvgElementFromJson({
"element": "g",
"attr": {"id": "selectorParentGroup"}
@ -489,7 +489,7 @@ function BatchCommand(text) {
return this.rubberBandBox;
};
initGroup();
this.initGroup();
}
// **************************************************************************************
@ -669,7 +669,6 @@ function BatchCommand(text) {
}
undoStack.push(cmd);
undoStackPointer = undoStack.length;
console.log(undoStack);
};
// private functions
@ -2317,6 +2316,8 @@ function BatchCommand(text) {
}
// clear the undo stack
resetUndoStack();
// reset the selector manager
selectorManager.initGroup();
call("cleared");
};