diff options
author | Artur Signell <artur@vaadin.com> | 2012-03-20 14:44:06 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-03-21 15:28:07 +0200 |
commit | 49c33ff2d04c04dd21c9244d673b934ac340eacb (patch) | |
tree | 1058052eeea2bc02ebcf9dea9437b4eaeb975a4f /src/com/vaadin/ui/AbstractComponent.java | |
parent | bd4f8df793edef2dffdf3365e859979e5a86280d (diff) | |
download | vaadin-framework-49c33ff2d04c04dd21c9244d673b934ac340eacb.tar.gz vaadin-framework-49c33ff2d04c04dd21c9244d673b934ac340eacb.zip |
Code cleanup
Diffstat (limited to 'src/com/vaadin/ui/AbstractComponent.java')
-rw-r--r-- | src/com/vaadin/ui/AbstractComponent.java | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/com/vaadin/ui/AbstractComponent.java b/src/com/vaadin/ui/AbstractComponent.java index 4d12e0ed27..ad91f342ba 100644 --- a/src/com/vaadin/ui/AbstractComponent.java +++ b/src/com/vaadin/ui/AbstractComponent.java @@ -438,14 +438,16 @@ public abstract class AbstractComponent implements Component, MethodEventSource * @see com.vaadin.ui.Component#setVisible(boolean) */ public void setVisible(boolean visible) { - if (getState().isVisible() != visible) { - getState().setVisible(visible); - requestRepaint(); - if (getParent() != null) { - // Must always repaint the parent (at least the hierarchy) when - // visibility of a child component changes. - getParent().requestRepaint(); - } + if (getState().isVisible() == visible) { + return; + } + + getState().setVisible(visible); + requestRepaint(); + if (getParent() != null) { + // Must always repaint the parent (at least the hierarchy) when + // visibility of a child component changes. + getParent().requestRepaint(); } } |