summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2011-03-31 11:06:43 +0000
committerArtur Signell <artur.signell@itmill.com>2011-03-31 11:06:43 +0000
commit17c5a3630dae59497504503912800a01cc7652a4 (patch)
tree761dbdc109e5c7ffba118502f82bc934093b19e7 /src
parent2bf2b55dcfe7bfc0a902afc26516dbcc362ca99e (diff)
downloadvaadin-framework-17c5a3630dae59497504503912800a01cc7652a4.tar.gz
vaadin-framework-17c5a3630dae59497504503912800a01cc7652a4.zip
#6590 Do not try to remove collapsed items when there are no collapsed items
svn changeset:18054/svn branch:6.5
Diffstat (limited to 'src')
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java b/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java
index 2b996d5792..56b7d198e0 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java
@@ -985,7 +985,8 @@ public class VMenuBar extends SimpleFocusablePanel implements Paintable,
int widthAvailable = diff + moreItemWidth;
int widthGrowth = 0;
- while (widthAvailable > widthGrowth) {
+ while (widthAvailable > widthGrowth
+ && collapsedRootItems.getItems().size() > 0) {
// Move first item from collapsed menu to the root menu
CustomMenuItem expand = collapsedRootItems.getItems()
.get(0);