diff options
author | dolphin <dolphin@lindenlab.com> | 2014-06-27 12:57:16 -0700 |
---|---|---|
committer | dolphin <dolphin@lindenlab.com> | 2014-06-27 12:57:16 -0700 |
commit | dd309984d7566710b9ceaf8f6edf2de1672f4f9c (patch) | |
tree | 41d0b99eceeb52d4b05dfe10877e1b0b2b70fd90 /indra/newview/llfloaterland.cpp | |
parent | 74634fb9dae5280c5a020b25f027a6f910053feb (diff) | |
parent | f80a41cf36f023aa0b5a7368d81dd237dafc8d4a (diff) |
Merge
Diffstat (limited to 'indra/newview/llfloaterland.cpp')
-rwxr-xr-x | indra/newview/llfloaterland.cpp | 30 |
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() |