Update childSetCommitCallback to upstream version, fixes the issue of crashing out upon using spinners in the colorpicker
This commit is contained in:
@@ -754,12 +754,16 @@ BOOL LLPanel::childHasFocus(const std::string& id)
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanel::childSetCommitCallback(const std::string& id, void (*cb)(LLUICtrl*, void*), void *userdata )
|
||||
// *TODO: Deprecate; for backwards compatability only:
|
||||
// Prefer getChild<LLUICtrl>("foo")->setCommitCallback(boost:bind(...)),
|
||||
// which takes a generic slot. Or use mCommitCallbackRegistrar.add() with
|
||||
// a named callback and reference it in XML.
|
||||
void LLPanel::childSetCommitCallback(const std::string& id, boost::function<void (LLUICtrl*,void*)> cb, void* data)
|
||||
{
|
||||
LLUICtrl* child = getChild<LLUICtrl>(id, true);
|
||||
LLUICtrl* child = findChild<LLUICtrl>(id);
|
||||
if (child)
|
||||
{
|
||||
child->setCommitCallback(cb, userdata);
|
||||
child->setCommitCallback(boost::bind(cb, child, data));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -170,7 +170,12 @@ public:
|
||||
void childSetFocus(const std::string& id, BOOL focus = TRUE);
|
||||
BOOL childHasFocus(const std::string& id);
|
||||
|
||||
void childSetCommitCallback(const std::string& id, void (*cb)(LLUICtrl*, void*), void* userdata = NULL );
|
||||
// *TODO: Deprecate; for backwards compatability only:
|
||||
// Prefer getChild<LLUICtrl>("foo")->setCommitCallback(boost:bind(...)),
|
||||
// which takes a generic slot. Or use mCommitCallbackRegistrar.add() with
|
||||
// a named callback and reference it in XML.
|
||||
void childSetCommitCallback(const std::string& id, boost::function<void (LLUICtrl*,void*)> cb, void* data = NULL);
|
||||
|
||||
void childSetValidate(const std::string& id, BOOL (*cb)(LLUICtrl*, void*) );
|
||||
|
||||
void childSetColor(const std::string& id, const LLColor4& color);
|
||||
|
||||
Reference in New Issue
Block a user