]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixed render & sync order
authorRisto Yrjänä <risto.yrjana@itmill.com>
Mon, 2 Feb 2009 08:22:17 +0000 (08:22 +0000)
committerRisto Yrjänä <risto.yrjana@itmill.com>
Mon, 2 Feb 2009 08:22:17 +0000 (08:22 +0000)
svn changeset:6693/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/IPopupView.java

index c5a63cae4c6ff84a65fa216966a821cb663c54e3..8b7d108386a31d8158c0e2f32e8a2b1582a9078a 100644 (file)
@@ -59,7 +59,6 @@ public class IPopupView extends HTML implements Container {
         // ..and when we close it
         popup.addPopupListener(new PopupListener() {
             public void onPopupClosed(PopupPanel sender, boolean autoClosed) {
-                ((CustomPopup) sender).syncChildren();
                 updateState(false);
             }
         });
@@ -167,7 +166,6 @@ public class IPopupView extends HTML implements Container {
     @Override
     protected void onDetach() {
         popup.hide();
-        client.unregisterPaintable(popup.popupComponentPaintable);
         super.onDetach();
     }
 
@@ -193,7 +191,7 @@ public class IPopupView extends HTML implements Container {
             super(true, false, true); // autoHide, not modal, dropshadow
         }
 
-        // For some reason ONMOUSEOUT events are not always recieved, so we have
+        // For some reason ONMOUSEOUT events are not always received, so we have
         // to use ONMOUSEMOVE that doesn't target the popup
         @Override
         public boolean onEventPreview(Event event) {
@@ -225,6 +223,7 @@ public class IPopupView extends HTML implements Container {
         @Override
         public void hide() {
             hiding = true;
+            syncChildren();
             unregisterPaintables();
             if (popupComponentWidget != null && popupComponentWidget != loading) {
                 remove(popupComponentWidget);
@@ -233,6 +232,12 @@ public class IPopupView extends HTML implements Container {
             super.hide();
         }
 
+        @Override
+        public void show() {
+            hiding = false;
+            super.show();
+        }
+
         /**
          * Try to sync all known active child widgets to server
          */