summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelpicks.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2021-07-23 07:26:20 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2021-07-23 07:26:20 +0300
commitb26bc394483b8315a4be31334d4e0947d845a4e1 (patch)
tree6bdc7ac2689aa8fef76292c6647b9137cb163606 /indra/newview/llpanelpicks.cpp
parent07a118889e9a15391e950710864800e8d5c43efc (diff)
parentbe6066eae218856f7fd74b98968a75e5062fa830 (diff)
Merge branch 'master' into DRTVWR-486
Diffstat (limited to 'indra/newview/llpanelpicks.cpp')
-rw-r--r--indra/newview/llpanelpicks.cpp45
1 files changed, 32 insertions, 13 deletions
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index 4762e15d8f..8294977f99 100644
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -483,19 +483,7 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type)
mNoClassifieds = !mClassifiedsList->size();
}
- bool no_data = mNoPicks && mNoClassifieds;
- mNoItemsLabel->setVisible(no_data);
- if (no_data)
- {
- if(getAvatarId() == gAgentID)
- {
- mNoItemsLabel->setValue(LLTrans::getString("NoPicksClassifiedsText"));
- }
- else
- {
- mNoItemsLabel->setValue(LLTrans::getString("NoAvatarPicksClassifiedsText"));
- }
- }
+ updateNoItemsLabel();
}
LLPickItem* LLPanelPicks::getSelectedPickItem()
@@ -724,6 +712,13 @@ bool LLPanelPicks::callbackDeletePick(const LLSD& notification, const LLSD& resp
{
LLAvatarPropertiesProcessor::instance().sendPickDelete(pick_value[PICK_ID]);
mPicksList->removeItemByValue(pick_value);
+
+ mNoPicks = !mPicksList->size();
+ if (mNoPicks)
+ {
+ showAccordion("tab_picks", false);
+ }
+ updateNoItemsLabel();
}
updateButtons();
return false;
@@ -738,6 +733,13 @@ bool LLPanelPicks::callbackDeleteClassified(const LLSD& notification, const LLSD
{
LLAvatarPropertiesProcessor::instance().sendClassifiedDelete(value[CLASSIFIED_ID]);
mClassifiedsList->removeItemByValue(value);
+
+ mNoClassifieds = !mClassifiedsList->size();
+ if (mNoClassifieds)
+ {
+ showAccordion("tab_classifieds", false);
+ }
+ updateNoItemsLabel();
}
updateButtons();
return false;
@@ -851,6 +853,23 @@ void LLPanelPicks::updateButtons()
}
}
+void LLPanelPicks::updateNoItemsLabel()
+{
+ bool no_data = mNoPicks && mNoClassifieds;
+ mNoItemsLabel->setVisible(no_data);
+ if (no_data)
+ {
+ if (getAvatarId() == gAgentID)
+ {
+ mNoItemsLabel->setValue(LLTrans::getString("NoPicksClassifiedsText"));
+ }
+ else
+ {
+ mNoItemsLabel->setValue(LLTrans::getString("NoAvatarPicksClassifiedsText"));
+ }
+ }
+}
+
void LLPanelPicks::setProfilePanel(LLPanelProfile* profile_panel)
{
mProfilePanel = profile_panel;