From 5a2424d01026327ae8eb17ec2b319495c6f5e9b1 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Wed, 4 Nov 2009 21:45:16 +0200 Subject: Fixed minor bug EXT-1769 (Edit Pick: '+' icon blinks on mouse over) --HG-- branch : product-engine --- indra/newview/llpanelpick.cpp | 24 ++++++++++++++++++++++-- indra/newview/llpanelpick.h | 11 +++++++++++ 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/indra/newview/llpanelpick.cpp b/indra/newview/llpanelpick.cpp index e725479abb..103f041686 100644 --- a/indra/newview/llpanelpick.cpp +++ b/indra/newview/llpanelpick.cpp @@ -40,6 +40,7 @@ #include "llagent.h" #include "llagentpicksinfo.h" #include "llbutton.h" +#include "lliconctrl.h" #include "lllineeditor.h" #include "llparcel.h" #include "llviewerparcelmgr.h" @@ -62,6 +63,7 @@ #define XML_SNAPSHOT "pick_snapshot" #define XML_LOCATION "pick_location" +#define XML_BTN_ON_TXTR "edit_icon" #define XML_BTN_SAVE "save_changes_btn" #define SAVE_BTN_LABEL "[WHAT]" @@ -401,8 +403,6 @@ BOOL LLPanelPickEdit::postBuild() LLPanelPickInfo::postBuild(); mSnapshotCtrl->setOnSelectCallback(boost::bind(&LLPanelPickEdit::onPickChanged, this, _1)); - mSnapshotCtrl->setMouseEnterCallback(boost::bind(&LLPanelPickEdit::childSetVisible, this, "edit_icon", true)); - mSnapshotCtrl->setMouseLeaveCallback(boost::bind(&LLPanelPickEdit::childSetVisible, this, "edit_icon", false)); LLLineEditor* line_edit = getChild("pick_name"); line_edit->setKeystrokeCallback(boost::bind(&LLPanelPickEdit::onPickChanged, this, _1), NULL); @@ -547,3 +547,23 @@ void LLPanelPickEdit::processProperties(void* data, EAvatarProcessorType type) LLPanelPickInfo::processProperties(data, type); } } + +// PRIVATE AREA + +void LLPanelPickEdit::initTexturePickerMouseEvents() +{ + text_icon = getChild(XML_BTN_ON_TXTR); + mSnapshotCtrl->setMouseEnterCallback(boost::bind(&LLPanelPickEdit::onTexturePickerMouseEnter, this, _1)); + mSnapshotCtrl->setMouseLeaveCallback(boost::bind(&LLPanelPickEdit::onTexturePickerMouseLeave, this, _1)); + text_icon->setVisible(FALSE); +} + +void LLPanelPickEdit::onTexturePickerMouseEnter(LLUICtrl* ctrl) +{ + text_icon->setVisible(TRUE); +} + +void LLPanelPickEdit::onTexturePickerMouseLeave(LLUICtrl* ctrl) +{ + text_icon->setVisible(FALSE); +} diff --git a/indra/newview/llpanelpick.h b/indra/newview/llpanelpick.h index 9b605cd6b1..2c0830f2ac 100644 --- a/indra/newview/llpanelpick.h +++ b/indra/newview/llpanelpick.h @@ -41,6 +41,7 @@ #include "llremoteparcelrequest.h" #include "llavatarpropertiesprocessor.h" +class LLIconCtrl; class LLTextureCtrl; class LLMessageSystem; class LLAvatarPropertiesObserver; @@ -236,6 +237,16 @@ protected: bool mLocationChanged; bool mNeedData; bool mNewPick; + +private: + + void initTexturePickerMouseEvents(); + void onTexturePickerMouseEnter(LLUICtrl* ctrl); + void onTexturePickerMouseLeave(LLUICtrl* ctrl); + +private: + + LLIconCtrl* text_icon; }; #endif // LL_LLPANELPICK_H -- cgit v1.2.3