summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterland.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterland.cpp')
-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()