popupMenu: Don't count the separator as an item when returning isEmpty
If we have a separator don't use it's possibly-unsynced visibility to determine if the menu is empty or not. https://bugzilla.gnome.org/show_bug.cgi?id=70386
This commit is contained in:
parent
cfecd063c9
commit
658db43ad3
@ -722,6 +722,8 @@ const PopupMenuBase = new Lang.Class({
|
|||||||
|
|
||||||
isEmpty: function() {
|
isEmpty: function() {
|
||||||
let hasVisibleChildren = this.box.get_children().some(function(child) {
|
let hasVisibleChildren = this.box.get_children().some(function(child) {
|
||||||
|
if (child._delegate instanceof PopupSeparatorMenuItem)
|
||||||
|
return false;
|
||||||
return child.visible;
|
return child.visible;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user