fix tooltip crash

This commit is contained in:
Eduardo Bart 2011-11-03 17:32:50 -02:00
parent dbbfe0b3ea
commit 6d6479e4a9
2 changed files with 4 additions and 2 deletions

View File

@ -29,6 +29,7 @@ function ToolTip.display(text)
size.width = size.width + 4
size.height = size.height + 4
currentToolTip:setSize(size)
moveToolTip(currentToolTip)
end
end

View File

@ -639,7 +639,9 @@ void UIWidget::updateState(Fw::WidgetState state)
}
if(updateChildren) {
for(const UIWidgetPtr& child : m_children)
// do a backup of children list, because it may change while looping it
UIWidgetList children = m_children;
for(const UIWidgetPtr& child : children)
child->updateState(state);
}
@ -843,7 +845,6 @@ void UIWidget::onStyleApply(const OTMLNodePtr& styleNode)
}
} else if(node->tag() == "onClick" ||
node->tag() == "onHoverChange") {
dump << node->tag();
g_lua.loadFunction(node->value(), "@" + node->source() + "[" + node->tag() + "]");
luaSetField(node->tag());
}