mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Group.isEmpty
This commit is contained in:
parent
1927ab2f59
commit
b52289b78b
@ -253,9 +253,8 @@ Drag.prototype = {
|
||||
Trenches.hideGuides();
|
||||
this.item.isDragging = false;
|
||||
|
||||
// TODO: create a Group.isEmpty instead.
|
||||
if (this.parent && !this.parent.locked.close && this.parent != this.item.parent
|
||||
&& this.parent._children.length == 0 && !this.parent.getTitle()) {
|
||||
&& this.parent.isEmpty()) {
|
||||
this.parent.close();
|
||||
}
|
||||
|
||||
|
@ -362,6 +362,13 @@ window.Group.prototype = iQ.extend(new Item(), new Subscribable(), {
|
||||
return data;
|
||||
},
|
||||
|
||||
// ----------
|
||||
// Function: isEmpty
|
||||
// Returns true if the tab group is empty and unnamed.
|
||||
isEmpty: function() {
|
||||
return this._children.length == 0 && !this.getTitle();
|
||||
},
|
||||
|
||||
// ----------
|
||||
// Function: save
|
||||
// Saves this group to persistant storage.
|
||||
|
Loading…
Reference in New Issue
Block a user