--- /dev/null
+package com.itmill.toolkit.tests.tickets;
+
+import com.itmill.toolkit.Application;
+import com.itmill.toolkit.ui.SplitPanel;
+import com.itmill.toolkit.ui.Window;
+
+public class Ticket2245 extends Application {
+
+ @Override
+ public void init() {
+ Window main = new Window("The Main Window");
+ main.getLayout().setSizeFull();
+ setMainWindow(main);
+ SplitPanel sp = new SplitPanel(SplitPanel.ORIENTATION_VERTICAL);
+ main.addComponent(sp);
+ }
+}
if (isVisible()) {
// TODO split this method
- if (getApplication().isDebugMode()
+ if (getApplication() != null
+ && getApplication().isDebugMode()
&& !DebugUtilities.validateComponentRelativeSizes(this,
false)) {
addStyleName("invalidlayout");
if (firstComponent != null) {
firstComponent.paint(target);
} else {
- (new OrderedLayout()).paint(target);
+ OrderedLayout temporaryComponent = new OrderedLayout();
+ temporaryComponent.setParent(this);
+ temporaryComponent.paint(target);
}
if (secondComponent != null) {
secondComponent.paint(target);
} else {
- (new OrderedLayout()).paint(target);
+ OrderedLayout temporaryComponent = new OrderedLayout();
+ temporaryComponent.setParent(this);
+ temporaryComponent.paint(target);
}
}