]> source.dussan.org Git - vaadin-framework.git/commitdiff
replacing selected tab no longer changes to first tab, fixes #591
authorMarc Englund <marc.englund@itmill.com>
Fri, 29 Feb 2008 11:17:32 +0000 (11:17 +0000)
committerMarc Englund <marc.englund@itmill.com>
Fri, 29 Feb 2008 11:17:32 +0000 (11:17 +0000)
svn changeset:3949/svn branch:trunk

src/com/itmill/toolkit/ui/TabSheet.java

index c97b4f8194456b8e36c1db2b482226f267ed7648..27ddabd9d785a3be5c93f93a4c932853d236a161 100644 (file)
@@ -321,6 +321,11 @@ public class TabSheet extends AbstractComponentContainer {
     /* Documented in superclass */
     public void replaceComponent(Component oldComponent, Component newComponent) {
 
+        if (selected == oldComponent) {
+            // keep selection w/o selectedTabChange event
+            selected = newComponent;
+        }
+
         // Gets the captions
         final String oldCaption = getTabCaption(oldComponent);
         final Resource oldIcon = getTabIcon(oldComponent);
@@ -373,6 +378,7 @@ public class TabSheet extends AbstractComponentContainer {
 
             requestRepaint();
         }
+
     }
 
     /* Click event ************************************************ */