summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui/TabSheet.java
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/com/vaadin/ui/TabSheet.java')
-rw-r--r--server/src/com/vaadin/ui/TabSheet.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/server/src/com/vaadin/ui/TabSheet.java b/server/src/com/vaadin/ui/TabSheet.java
index 592515c560..66784aaa02 100644
--- a/server/src/com/vaadin/ui/TabSheet.java
+++ b/server/src/com/vaadin/ui/TabSheet.java
@@ -736,6 +736,9 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
if (oldLocation == -1) {
addComponent(newComponent);
} else if (newLocation == -1) {
+ if (selected == oldComponent) {
+ setSelected(null);
+ }
removeComponent(oldComponent);
newTab = addTab(newComponent, oldLocation);
@@ -752,6 +755,9 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
if (selectAfterInserting) {
setSelected(newComponent);
+ //SelectedTabChangeEvent should be fired here as selected Tab is changed.
+ //Other cases are handled implicitly by removeComponent() and addComponent()addTab()
+ fireSelectedTabChange();
}
// Tab associations are not changed, but metadata is swapped between