diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-06-03 01:41:25 +0300 |
|---|---|---|
| committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-06-03 02:10:30 +0300 |
| commit | 6354a053e366e1b6228c45a5dc9f92b262862dbe (patch) | |
| tree | 72d72b9eea87ee9aebf4e3dc77e2ad0d83a00cec /indra/newview/llpanelprofilepicks.cpp | |
| parent | 3efe64619b772ce8cab596d7e74de48dcc7f6c20 (diff) | |
SL-15312 Show user's sl birthday
Diffstat (limited to 'indra/newview/llpanelprofilepicks.cpp')
| -rw-r--r-- | indra/newview/llpanelprofilepicks.cpp | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/indra/newview/llpanelprofilepicks.cpp b/indra/newview/llpanelprofilepicks.cpp index 7142051f17..69f6ac0407 100644 --- a/indra/newview/llpanelprofilepicks.cpp +++ b/indra/newview/llpanelprofilepicks.cpp @@ -152,16 +152,25 @@ void LLPanelProfilePicks::createPick(const LLPickData &data) { if (getIsLoaded()) { - mNoItemsLabel->setVisible(FALSE); - LLPanelProfilePick* pick_panel = LLPanelProfilePick::create(); - pick_panel->setAvatarId(getAvatarId()); - pick_panel->processProperties(&data); - mTabContainer->addTabPanel( - LLTabContainer::TabPanelParams(). - panel(pick_panel). - select_tab(true). - label(pick_panel->getPickName())); - updateButtons(); + if (canAddNewPick()) + { + mNoItemsLabel->setVisible(FALSE); + LLPanelProfilePick* pick_panel = LLPanelProfilePick::create(); + pick_panel->setAvatarId(getAvatarId()); + pick_panel->processProperties(&data); + mTabContainer->addTabPanel( + LLTabContainer::TabPanelParams(). + panel(pick_panel). + select_tab(true). + label(pick_panel->getPickName())); + updateButtons(); + } + else + { + // This means that something doesn't properly check limits + // before creating a pick + LL_WARNS() << "failed to add pick" << LL_ENDL; + } } else { @@ -313,7 +322,7 @@ void LLPanelProfilePicks::processProperties(const LLAvatarPicks* avatar_picks) } } - while (!mSheduledPickCreation.empty()) + while (!mSheduledPickCreation.empty() && canAddNewPick()) { const LLPickData data = mSheduledPickCreation.back(); @@ -331,6 +340,8 @@ void LLPanelProfilePicks::processProperties(const LLAvatarPicks* avatar_picks) has_selection = true; } + mSheduledPickCreation.clear(); + BOOL no_data = !mTabContainer->getTabCount(); mNoItemsLabel->setVisible(no_data); if (no_data) |
