lib/glimmer/dsl/opal/widget_expression.rb in glimmer-dsl-opal-0.7.0 vs lib/glimmer/dsl/opal/widget_expression.rb in glimmer-dsl-opal-0.7.1
- old
+ new
@@ -18,11 +18,15 @@
def interpret(parent, keyword, *args, &block)
Glimmer::SWT::WidgetProxy.for(keyword, parent, args, block)
end
def add_content(parent, &block)
- super(parent, &block)
- parent.post_add_content
+ if parent.rendered?
+ super(parent, &block)
+ parent.post_add_content
+ else
+ parent.add_content_on_render(&block)
+ end
end
end
end
end
end