summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCho <cho@lindenlab.com>2014-06-25 22:11:31 +0100
committerCho <cho@lindenlab.com>2014-06-25 22:11:31 +0100
commit9b6598388a5fa085d89b77b57f0b361d53a680cb (patch)
tree04732129a744529711839245b0cd8650da9168a9
parent200788c344f5449f99eacc9167ac15c7e6262b69 (diff)
Disable About Land Experiences tab when parcel is not selected, for ACME-1528
-rwxr-xr-xindra/newview/llfloaterland.cpp30
1 files changed, 20 insertions, 10 deletions
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 8d2d29ace1..4fda1ebb7d 100755
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -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)
+ {
+ // disable the panel
+ panel->setEnabled(FALSE);
+ panel->setExperienceIds(LLSD::emptyArray());
+ }
+ else
{
- ids.append(it->second.mID);
+ // 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()