diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-10-22 00:21:18 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-10-22 00:21:18 +0000 |
commit | 0041d485b1c5a1b18c9d5b2ae016f2c1e5ea6b8e (patch) | |
tree | e69610d38613885aa123c2744dd07db581a810d2 /indra/newview/llpanelpicks.cpp | |
parent | 67c4555a3793850ca8a8142b1e3e72c90d5001f4 (diff) |
Merging revisions 2129-2144 of https://svn.aws.productengine.com/secondlife/pe/stable-2 into P:\svn\viewer-2.0.0-3, respecting ancestry
* Bugs: EXT-1293 EXT-1611 EXT-1613 EXT-1176 EXT-1724 EXT-1186 EXT-1662 EXT-1760 EXT-1720
* Dev: EXT-1575 EXT-1770 EXT-1232 EXT-1234
Diffstat (limited to 'indra/newview/llpanelpicks.cpp')
-rw-r--r-- | indra/newview/llpanelpicks.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp index d6040c497c..1219a08c6c 100644 --- a/indra/newview/llpanelpicks.cpp +++ b/indra/newview/llpanelpicks.cpp @@ -33,6 +33,7 @@ #include "llviewerprecompiledheaders.h" #include "llagent.h" +#include "llagentpicksinfo.h" #include "llavatarconstants.h" #include "llflatlistview.h" #include "llfloaterreg.h" @@ -302,14 +303,13 @@ void LLPanelPicks::onDoubleClickItem(LLUICtrl* item) void LLPanelPicks::updateButtons() { - int picks_num = mPicksList->size(); bool has_selected = mPicksList->numSelected(); childSetEnabled(XML_BTN_INFO, has_selected); if (getAvatarId() == gAgentID) { - childSetEnabled(XML_BTN_NEW, picks_num < MAX_AVATAR_PICKS); + childSetEnabled(XML_BTN_NEW, !LLAgentPicksInfo::getInstance()->isPickLimitReached()); childSetEnabled(XML_BTN_DELETE, has_selected); } @@ -364,6 +364,12 @@ void LLPanelPicks::onPanelPickClose(LLPanel* panel) panel->setVisible(FALSE); } +void LLPanelPicks::onPanelPickSave(LLPanel* panel) +{ + onPanelPickClose(panel); + updateButtons(); +} + void LLPanelPicks::createPickInfoPanel() { if(!mPanelPickInfo) @@ -381,7 +387,7 @@ void LLPanelPicks::createPickEditPanel() { mPanelPickEdit = LLPanelPickEdit::create(); mPanelPickEdit->setExitCallback(boost::bind(&LLPanelPicks::onPanelPickClose, this, mPanelPickEdit)); - mPanelPickEdit->setSaveCallback(boost::bind(&LLPanelPicks::onPanelPickClose, this, mPanelPickEdit)); + mPanelPickEdit->setSaveCallback(boost::bind(&LLPanelPicks::onPanelPickSave, this, mPanelPickEdit)); mPanelPickEdit->setCancelCallback(boost::bind(&LLPanelPicks::onPanelPickClose, this, mPanelPickEdit)); mPanelPickEdit->setVisible(FALSE); } |