Skip to content

Commit

Permalink
Fixed a bug in the save as functionality where
Browse files Browse the repository at this point in the history
the filename of a tab would change but the
corresponding file would not, causing the old file
to be overwritten on save.
  • Loading branch information
Eddy Bruel committed Jan 4, 2011
1 parent f66b746 commit 354b3c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client/core/document.js
Expand Up @@ -14,6 +14,10 @@ var Document = function(node, docValue){
return node;
}

this.setNode = function(newNode) {
return node = newNode;
}

this.hasValue = function(){
return docValue !== undefined;
}
Expand Down
1 change: 1 addition & 0 deletions client/ext/save/save.js
Expand Up @@ -259,6 +259,7 @@ return ext.register("ext/save/save", {
model.load(node);
file = model.data;
fs.beforeRename(file, null, newPath);
page.$doc.setNode(file);
}
setTimeout(function () {
if (panel.caption == "Saved file " + newPath)
Expand Down

0 comments on commit 354b3c8

Please sign in to comment.