fix tooltip crash
This commit is contained in:
parent
dbbfe0b3ea
commit
6d6479e4a9
|
@ -29,6 +29,7 @@ function ToolTip.display(text)
|
||||||
size.width = size.width + 4
|
size.width = size.width + 4
|
||||||
size.height = size.height + 4
|
size.height = size.height + 4
|
||||||
currentToolTip:setSize(size)
|
currentToolTip:setSize(size)
|
||||||
|
moveToolTip(currentToolTip)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -639,7 +639,9 @@ void UIWidget::updateState(Fw::WidgetState state)
|
||||||
}
|
}
|
||||||
|
|
||||||
if(updateChildren) {
|
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);
|
child->updateState(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -843,7 +845,6 @@ void UIWidget::onStyleApply(const OTMLNodePtr& styleNode)
|
||||||
}
|
}
|
||||||
} else if(node->tag() == "onClick" ||
|
} else if(node->tag() == "onClick" ||
|
||||||
node->tag() == "onHoverChange") {
|
node->tag() == "onHoverChange") {
|
||||||
dump << node->tag();
|
|
||||||
g_lua.loadFunction(node->value(), "@" + node->source() + "[" + node->tag() + "]");
|
g_lua.loadFunction(node->value(), "@" + node->source() + "[" + node->tag() + "]");
|
||||||
luaSetField(node->tag());
|
luaSetField(node->tag());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue