lib/glimmer/dsl/engine.rb in glimmer-0.5.3 vs lib/glimmer/dsl/engine.rb in glimmer-0.5.4
- old
+ new
@@ -56,12 +56,12 @@
#
# This allows evaluating parent UI object properties and children
#
# For example, a shell widget would get properties set and children added
def add_content(parent, expression, &block)
- parent_stack.push(parent)
+ parent_stack.push(parent) if expression.is_a?(ParentExpression)
expression.add_content(parent, &block) if block_given?
- parent_stack.pop
+ parent_stack.pop if expression.is_a?(ParentExpression)
end
# Current parent while evaluating Glimmer DSL (nil if just started or done evaluatiing)
#
# Parents are maintained in a stack while evaluating Glimmer DSL