]> source.dussan.org Git - vaadin-framework.git/commitdiff
Additional tweaks based on review (#8507)
authorArtur Signell <artur@vaadin.com>
Thu, 19 Apr 2012 09:16:30 +0000 (12:16 +0300)
committerArtur Signell <artur@vaadin.com>
Thu, 19 Apr 2012 19:10:32 +0000 (22:10 +0300)
src/com/vaadin/terminal/gwt/client/ui/AbstractComponentConnector.java

index a68875a7d544cf51c1bf2f7980dacc3a8e6b4f9a..fdb04f0ddfe73ecdfa51b13cb818f00e6240d702 100644 (file)
@@ -93,7 +93,6 @@ public abstract class AbstractComponentConnector extends AbstractConnector
 
         }
 
-        setWidgetEnabled(isEnabled());
         /*
          * Disabled state may affect (override) tabindex so the order must be
          * first setting tabindex, then enabled state.
@@ -103,6 +102,8 @@ public abstract class AbstractComponentConnector extends AbstractConnector
                     .getTabIndex());
         }
 
+        setWidgetEnabled(isEnabled());
+
         // Style names
         String styleName = getStyleNames(getWidget().getStylePrimaryName());
         getWidget().setStyleName(styleName);
@@ -139,10 +140,7 @@ public abstract class AbstractComponentConnector extends AbstractConnector
 
     public void setWidgetEnabled(boolean widgetEnabled) {
         if (getWidget() instanceof HasEnabled) {
-            HasEnabled hasEnabled = (HasEnabled) getWidget();
-            if (hasEnabled.isEnabled() != widgetEnabled) {
-                hasEnabled.setEnabled(widgetEnabled);
-            }
+            ((HasEnabled) getWidget()).setEnabled(widgetEnabled);
         }
     }