|
@@ -415,11 +415,12 @@ class Context<T extends DocumentRegistry.IModel> implements DocumentRegistry.ICo
|
|
|
return;
|
|
|
}
|
|
|
if (change.oldValue.path === this._path) {
|
|
|
- let path = this._path = change.newValue.path;
|
|
|
if (this._session) {
|
|
|
- this._session.rename(path);
|
|
|
+ this._session.rename(change.newValue.path);
|
|
|
+ } else {
|
|
|
+ this._path = change.newValue.path;
|
|
|
+ this.pathChanged.emit(this._path);
|
|
|
}
|
|
|
- this.pathChanged.emit(path);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -455,8 +456,7 @@ class Context<T extends DocumentRegistry.IModel> implements DocumentRegistry.ICo
|
|
|
/**
|
|
|
* Handle a change to a session path.
|
|
|
*/
|
|
|
- private _onSessionPathChanged(sender: Session.ISession) {
|
|
|
- let path = sender.path;
|
|
|
+ private _onSessionPathChanged(sender: Session.ISession, path: string) {
|
|
|
if (path !== this._path) {
|
|
|
this._path = path;
|
|
|
this.pathChanged.emit(path);
|