diff --git a/indra/newview/llpaneldisplay.cpp b/indra/newview/llpaneldisplay.cpp index 375781a95..d354dc516 100644 --- a/indra/newview/llpaneldisplay.cpp +++ b/indra/newview/llpaneldisplay.cpp @@ -193,7 +193,8 @@ BOOL LLPanelDisplay::postBuild() } mCtrlAspectRatio = getChild( "aspect_ratio"); - mCtrlAspectRatio->setTextEntryCallback(boost::bind(&LLPanelDisplay::onKeystrokeAspectRatio,this)); + mCtrlAspectRatio->setTextEntryCallback(&LLPanelDisplay::onKeystrokeAspectRatio); + mCtrlAspectRatio->setCallbackUserData(this); mCtrlAspectRatio->setCommitCallback(boost::bind(&LLPanelDisplay::onSelectAspectRatio,this)); // add default aspect ratios mCtrlAspectRatio->add(aspect_ratio_text, &mAspectRatio, ADD_TOP); @@ -1030,9 +1031,11 @@ void LLPanelDisplay::onCommitAutoDetectAspect(const LLSD& value) } } -void LLPanelDisplay::onKeystrokeAspectRatio() +void LLPanelDisplay::onKeystrokeAspectRatio(LLLineEditor* caller, void *user_data) { - mCtrlAutoDetectAspect->set(FALSE); + LLPanelDisplay* panel = (LLPanelDisplay*)user_data; + + panel->mCtrlAutoDetectAspect->set(FALSE); } void LLPanelDisplay::onSelectAspectRatio() diff --git a/indra/newview/llpaneldisplay.h b/indra/newview/llpaneldisplay.h index 9b39ee555..07b6b6dbe 100644 --- a/indra/newview/llpaneldisplay.h +++ b/indra/newview/llpaneldisplay.h @@ -202,7 +202,7 @@ protected: static void onChangeCustom(); void onCommitAutoDetectAspect(const LLSD& value); - void onKeystrokeAspectRatio(); + static void onKeystrokeAspectRatio(LLLineEditor* caller, void *user_data); void onSelectAspectRatio(); void onCommitWindowedMode(); static void updateSliderText(LLUICtrl* ctrl, LLTextBox* text_box);