diff options
author | Leif Åstrand <leif@vaadin.com> | 2015-05-18 14:59:39 +0300 |
---|---|---|
committer | Teemu Suo-Anttila <teemusa@vaadin.com> | 2015-07-21 14:40:56 +0300 |
commit | b7fd1b2f2909b9941e12da6c769d3e9c1e85dd78 (patch) | |
tree | 07f75b1760d7bec407e3bd0242213e7ce542ace7 /client | |
parent | 5cab6f2d8c46042896fb423f61643d7a89041d76 (diff) | |
download | vaadin-framework-b7fd1b2f2909b9941e12da6c769d3e9c1e85dd78.tar.gz vaadin-framework-b7fd1b2f2909b9941e12da6c769d3e9c1e85dd78.zip |
Read debug window settings when all entry points have run (#17882)
Change-Id: I033635b0c314e67330f894e79d69fc8d2e129562
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/debug/internal/VDebugWindow.java | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/client/src/com/vaadin/client/debug/internal/VDebugWindow.java b/client/src/com/vaadin/client/debug/internal/VDebugWindow.java index b543c23e4d..fbc838f861 100644 --- a/client/src/com/vaadin/client/debug/internal/VDebugWindow.java +++ b/client/src/com/vaadin/client/debug/internal/VDebugWindow.java @@ -19,6 +19,8 @@ import java.util.ArrayList; import java.util.Date; import com.google.gwt.core.client.Duration; +import com.google.gwt.core.client.Scheduler; +import com.google.gwt.core.client.Scheduler.ScheduledCommand; import com.google.gwt.core.shared.GWT; import com.google.gwt.dom.client.Element; import com.google.gwt.dom.client.NativeEvent; @@ -698,22 +700,32 @@ public final class VDebugWindow extends VOverlay { public void init() { show(); - readStoredState(); - Window.addResizeHandler(new com.google.gwt.event.logical.shared.ResizeHandler() { + /* + * Finalize initialization when all entry points have had the chance to + * e.g. register new sections. + */ + Scheduler.get().scheduleFinally(new ScheduledCommand() { + @Override + public void execute() { + readStoredState(); - Timer t = new Timer() { - @Override - public void run() { - applyPositionAndSize(); - } - }; + Window.addResizeHandler(new com.google.gwt.event.logical.shared.ResizeHandler() { - @Override - public void onResize(ResizeEvent event) { - t.cancel(); - // TODO less - t.schedule(1000); + Timer t = new Timer() { + @Override + public void run() { + applyPositionAndSize(); + } + }; + + @Override + public void onResize(ResizeEvent event) { + t.cancel(); + // TODO less + t.schedule(1000); + } + }); } }); } |