MAINT-6421 Inappropriate menu items are presented in gear menu when no outfit is selected in Visual Outfit Browser

meow-7.2.2
Mnikolenko Productengine 2016-05-18 15:02:15 +03:00
parent 6d4d58738c
commit 5bee6f1e5e
1 changed files with 4 additions and 3 deletions

View File

@ -735,11 +735,12 @@ LLOutfitGalleryGearMenu::LLOutfitGalleryGearMenu(LLOutfitListBase* olist)
void LLOutfitGalleryGearMenu::onUpdateItemsVisibility()
{
if (!mMenu) return;
bool have_selection = getSelectedOutfitID().notNull();
mMenu->setItemVisible("expand", FALSE);
mMenu->setItemVisible("collapse", FALSE);
mMenu->setItemVisible("upload_photo", TRUE);
mMenu->setItemVisible("select_photo", TRUE);
mMenu->setItemVisible("take_snapshot", TRUE);
mMenu->setItemVisible("upload_photo", have_selection);
mMenu->setItemVisible("select_photo", have_selection);
mMenu->setItemVisible("take_snapshot", have_selection);
LLOutfitListGearMenuBase::onUpdateItemsVisibility();
}