summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAutomerge <automerge@vaadin.com>2012-02-15 02:18:50 +0000
committerAutomerge <automerge@vaadin.com>2012-02-15 02:18:50 +0000
commitaa13b3432bab77bb2dfca0db9b437b222517813f (patch)
tree66e3f7a7e8289d8267dcbe2843ebf693cd24649f /src
parent5b2e12623424e3603a5983895d122ba333db5b18 (diff)
downloadvaadin-framework-aa13b3432bab77bb2dfca0db9b437b222517813f.tar.gz
vaadin-framework-aa13b3432bab77bb2dfca0db9b437b222517813f.zip
[merge from 6.7] #8114 - Fixed TabSheet rendering of first tab when another tab is selected
svn changeset:23014/svn branch:6.8
Diffstat (limited to 'src')
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java b/src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java
index d30d999d16..39b3779682 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java
@@ -52,7 +52,7 @@ public class VTabsheet extends VTabsheetBase {
/**
* Representation of a single "tab" shown in the TabBar
- *
+ *
*/
private static class Tab extends SimplePanel {
private static final String TD_CLASSNAME = CLASSNAME + "-tabitemcell";
@@ -341,13 +341,16 @@ public class VTabsheet extends VTabsheetBase {
}
public Tab addTab() {
+ // Must check this before insert as insert updates the tab count
+ boolean firstTab = (getTabCount() == 0);
+
Tab t = new Tab(this);
// Logical attach
int spacerIndex = getTabCount();
insert(t, tr, spacerIndex, true);
- if (getTabCount() == 0) {
+ if (firstTab) {
// Set the "first" style
t.setStyleNames(false, true);
}