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:
@@ -126,7 +126,7 @@ LLSpinCtrl::LLSpinCtrl( const std::string& name, const LLRect& rect, const std::
|
||||
&LLLineEditor::prevalidateASCII );
|
||||
mEditor->setFollowsLeft();
|
||||
mEditor->setFollowsBottom();
|
||||
mEditor->setFocusReceivedCallback( &LLSpinCtrl::onEditorGainFocus, this );
|
||||
mEditor->setFocusReceivedCallback( boost::bind(&LLSpinCtrl::onFocusReceived, this) );
|
||||
//RN: this seems to be a BAD IDEA, as it makes the editor behavior different when it has focus
|
||||
// than when it doesn't. Instead, if you always have to double click to select all the text,
|
||||
// it's easier to understand
|
||||
@@ -243,15 +243,6 @@ void LLSpinCtrl::onDownBtn( void *userdata )
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLSpinCtrl::onEditorGainFocus( LLFocusableElement* caller, void *userdata )
|
||||
{
|
||||
LLSpinCtrl* self = (LLSpinCtrl*) userdata;
|
||||
llassert( caller == self->mEditor );
|
||||
|
||||
self->onFocusReceived();
|
||||
}
|
||||
|
||||
void LLSpinCtrl::setValue(const LLSD& value )
|
||||
{
|
||||
F32 v = (F32)value.asReal();
|
||||
|
||||
Reference in New Issue
Block a user