mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-12-23 03:43:48 +01:00
Fix copy and paste issue.
This commit is contained in:
parent
bf3bd5c1c7
commit
1c1fc2ca96
@ -57,12 +57,20 @@ mindplot.commands.AddTopicCommand = new Class({
|
||||
},
|
||||
|
||||
undoExecute:function (commandContext) {
|
||||
// Finally, delete the topic from the workspace ...
|
||||
// Delete disconnected the nodes. Create a copy of the topics ...
|
||||
var clonedModel = [];
|
||||
this._models.each(function (model) {
|
||||
clonedModel.push(model.clone());
|
||||
});
|
||||
|
||||
// Finally, remove the nodes ...
|
||||
this._models.each(function (model) {
|
||||
|
||||
var topicId = model.getId();
|
||||
var topic = commandContext.findTopics(topicId)[0];
|
||||
commandContext.deleteTopic(topic);
|
||||
}.bind(this));
|
||||
|
||||
this._models = clonedModel;
|
||||
}
|
||||
});
|
Loading…
Reference in New Issue
Block a user