From 051da01da364c7a7bfee6e581757812f3e4c0dc2 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev <ychebotarev@productengine.com> Date: Wed, 26 May 2010 11:36:47 +0300 Subject: [PATCH] EXT-7423 FIX Roles tab was marked as updated when role description field receives focus. reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/444/ --HG-- branch : product-engine --- indra/newview/llpanelgrouproles.cpp | 9 +++++++-- indra/newview/llpanelgrouproles.h | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 7dec2251e84..b4a18d83896 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -1749,8 +1749,7 @@ BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root) mRoleTitle->setKeystrokeCallback(onPropertiesKey, this); mRoleDescription->setCommitOnFocusLost(TRUE); - mRoleDescription->setCommitCallback(onDescriptionCommit, this); - mRoleDescription->setFocusReceivedCallback(boost::bind(onDescriptionFocus, _1, this)); + mRoleDescription->setKeystrokeCallback(boost::bind(&LLPanelGroupRolesSubTab::onDescriptionKeyStroke, this, _1)); setFooterEnabled(FALSE); @@ -2216,6 +2215,12 @@ void LLPanelGroupRolesSubTab::onDescriptionFocus(LLFocusableElement* ctrl, void* self->notifyObservers(); } +void LLPanelGroupRolesSubTab::onDescriptionKeyStroke(LLTextEditor* caller) +{ + mHasRoleChange = TRUE; + notifyObservers(); +} + // static void LLPanelGroupRolesSubTab::onDescriptionCommit(LLUICtrl* ctrl, void* user_data) { diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h index 44aa7cea381..cb7941ad9e4 100644 --- a/indra/newview/llpanelgrouproles.h +++ b/indra/newview/llpanelgrouproles.h @@ -244,8 +244,9 @@ class LLPanelGroupRolesSubTab : public LLPanelGroupSubTab static void onPropertiesKey(LLLineEditor*, void*); + void onDescriptionKeyStroke(LLTextEditor* caller); + static void onDescriptionCommit(LLUICtrl*, void*); - static void onDescriptionFocus(LLFocusableElement*, void*); static void onMemberVisibilityChange(LLUICtrl*, void*); void handleMemberVisibilityChange(bool value); -- GitLab