Disable About Land Experiences tab when parcel is not selected, for ACME-1528

meow-7.2.2
Cho 2014-06-25 22:11:31 +01:00
parent 200788c344
commit 9b6598388a
1 changed files with 20 additions and 10 deletions

View File

@ -3012,21 +3012,31 @@ void LLPanelLandExperiences::refreshPanel(LLPanelExperienceListEditor* panel, U3
LLParcel *parcel = mParcel->getParcel();
// Display options
if (parcel == NULL || panel == NULL)
if (panel == NULL)
{
return;
}
LLAccessEntry::map entries = parcel->getExperienceKeysByType(xp_type);
LLAccessEntry::map::iterator it = entries.begin();
LLSD ids = LLSD::emptyArray();
for (/**/; it != entries.end(); ++it)
if (parcel == NULL)
{
ids.append(it->second.mID);
// disable the panel
panel->setEnabled(FALSE);
panel->setExperienceIds(LLSD::emptyArray());
}
else
{
// enable the panel
panel->setEnabled(TRUE);
LLAccessEntry::map entries = parcel->getExperienceKeysByType(xp_type);
LLAccessEntry::map::iterator it = entries.begin();
LLSD ids = LLSD::emptyArray();
for (/**/; it != entries.end(); ++it)
{
ids.append(it->second.mID);
}
panel->setExperienceIds(ids);
panel->setReadonly(!LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_OPTIONS));
panel->refreshExperienceCounter();
}
panel->setExperienceIds(ids);
panel->setReadonly(!LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_OPTIONS));
panel->refreshExperienceCounter();
}
void LLPanelLandExperiences::refresh()