Updated LLFocusMgr to use boost::signals2 instead of vanilla function pointers. Also removed top-focus handling from lluictrl because it doesn't belong there.
This commit is contained in:
@@ -121,7 +121,7 @@ LLSliderCtrl::LLSliderCtrl(const std::string& name, const LLRect& rect,
|
||||
&LLLineEditor::prevalidateFloat );
|
||||
mEditor->setFollowsLeft();
|
||||
mEditor->setFollowsBottom();
|
||||
mEditor->setFocusReceivedCallback( &LLSliderCtrl::onEditorGainFocus, this );
|
||||
mEditor->setFocusReceivedCallback( boost::bind(&LLSliderCtrl::onFocusReceived, this) );
|
||||
mEditor->setIgnoreTab(TRUE);
|
||||
// don't do this, as selecting the entire text is single clicking in some cases
|
||||
// and double clicking in others
|
||||
@@ -140,17 +140,6 @@ LLSliderCtrl::LLSliderCtrl(const std::string& name, const LLRect& rect,
|
||||
updateText();
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLSliderCtrl::onEditorGainFocus( LLFocusableElement* caller, void *userdata )
|
||||
{
|
||||
LLSliderCtrl* self = (LLSliderCtrl*) userdata;
|
||||
llassert( caller == self->mEditor );
|
||||
|
||||
self->onFocusReceived();
|
||||
}
|
||||
|
||||
|
||||
void LLSliderCtrl::setValue(F32 v, BOOL from_event)
|
||||
{
|
||||
mSlider->setValue( v, from_event );
|
||||
|
||||
Reference in New Issue
Block a user