summaryrefslogtreecommitdiff
path: root/indra/newview/lloutfitgallery.cpp
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2016-05-31 18:04:05 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2016-05-31 18:04:05 +0300
commitd1b7deda45f778e0fcfb92f38f9f5694ab285d1c (patch)
tree77eb5f6ed3c7e0c7f88f216bedc3b12da4fe4a58 /indra/newview/lloutfitgallery.cpp
parent2b9927863ff6826bc448379e2f829b1de5e6c3fb (diff)
MAINT-6452 No message is displayed when there is no outfits in Gallery
Diffstat (limited to 'indra/newview/lloutfitgallery.cpp')
-rw-r--r--indra/newview/lloutfitgallery.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp
index 6a8256d41c..7bd9c0bd94 100644
--- a/indra/newview/lloutfitgallery.cpp
+++ b/indra/newview/lloutfitgallery.cpp
@@ -99,6 +99,7 @@ BOOL LLOutfitGallery::postBuild()
BOOL rv = LLOutfitListBase::postBuild();
mScrollPanel = getChild<LLScrollContainer>("gallery_scroll_panel");
mGalleryPanel = getChild<LLPanel>("gallery_panel");
+ mMessageTextBox = getChild<LLTextBox>("no_outfits_txt");
mOutfitGalleryMenu = new LLOutfitGalleryContextMenu(this);
return rv;
}
@@ -168,6 +169,7 @@ void LLOutfitGallery::reArrangeRows(S32 row_diff)
applyFilter(*it,sFilterSubString);
addToGallery(*it);
}
+ updateMessageVisibility();
}
void LLOutfitGallery::updateGalleryWidth()
@@ -558,6 +560,22 @@ bool LLOutfitGallery::canWearSelected()
return false;
}
+void LLOutfitGallery::updateMessageVisibility()
+{
+ if(mItems.empty())
+ {
+ mMessageTextBox->setVisible(TRUE);
+ mScrollPanel->setVisible(FALSE);
+ std::string message = sFilterSubString.empty()? getString("no_outfits_msg") : getString("no_matched_outfits_msg");
+ mMessageTextBox->setValue(message);
+ }
+ else
+ {
+ mScrollPanel->setVisible(TRUE);
+ mMessageTextBox->setVisible(FALSE);
+ }
+}
+
LLOutfitListGearMenuBase* LLOutfitGallery::createGearMenu()
{
return new LLOutfitGalleryGearMenu(this);