Undo previous change again and document Project#remove().

This commit is contained in:
Jürg Lehni 2011-06-27 14:43:28 +02:00
parent d1305ff91c
commit bd5329c537

View file

@ -99,10 +99,15 @@ var Project = this.Project = Base.extend(/** @lends Project# */{
return false;
},
/**
* Removes this project from the global {@see _global_#projects} list.
*/
remove: function() {
if (this._scope) {
Base.splice(this._scope.projects, null, this._index, 1);
this._scope.remove();
// Clear the active project reference if it was pointint to this.
if (this._scope.project == this)
this._scope.project = null;
this._scope = null;
return true;
}