diff options
author | John Ahlroos <john@vaadin.com> | 2012-11-13 10:49:42 +0000 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2012-11-13 10:49:42 +0000 |
commit | d8c6c4cfefff20d20d3c269a47714d42dc26ba1d (patch) | |
tree | 84657bbb063e3ac755e5cb732194f63f98d343d6 | |
parent | 46c8f62546cf177a24258787c16cb9a9fc166463 (diff) | |
parent | 5323d619a769cb73fdcb52e07a2e67451a3dc4e8 (diff) | |
download | vaadin-framework-d8c6c4cfefff20d20d3c269a47714d42dc26ba1d.tar.gz vaadin-framework-d8c6c4cfefff20d20d3c269a47714d42dc26ba1d.zip |
Merge "Fixed widget comparisons to avoid reattaching children (#9807)"
-rw-r--r-- | client/src/com/vaadin/client/ui/accordion/VAccordion.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/client/src/com/vaadin/client/ui/accordion/VAccordion.java b/client/src/com/vaadin/client/ui/accordion/VAccordion.java index ce973f9630..70398c238f 100644 --- a/client/src/com/vaadin/client/ui/accordion/VAccordion.java +++ b/client/src/com/vaadin/client/ui/accordion/VAccordion.java @@ -131,7 +131,7 @@ public class VAccordion extends VTabsheetBase { Widget itemWidget = item.getComponent(); if (tabContent != null) { - if (tabContent != itemWidget) { + if (tabContent.getWidget() != itemWidget) { /* * This is not the same widget as before, find out if it has * been moved @@ -542,8 +542,14 @@ public class VAccordion extends VTabsheetBase { @Override protected ComponentConnector getTab(int index) { if (index < getWidgetCount()) { - Widget w = getStackItem(index); - return ConnectorMap.get(client).getConnector(w); + StackItem stackItem = getStackItem(index); + if (stackItem == null) { + return null; + } + Widget w = stackItem.getChildWidget(); + if (w != null) { + return ConnectorMap.get(client).getConnector(w); + } } return null; |