summaryrefslogtreecommitdiff
path: root/indra/newview/llpanellandmarks.cpp
diff options
context:
space:
mode:
authorEuclid Linden <euclid@lindenlab.com>2022-04-18 21:56:26 +0000
committerEuclid Linden <euclid@lindenlab.com>2022-04-18 21:56:26 +0000
commite71201ac125cab5f3d3cf7d6a30500253fc29d90 (patch)
tree270e46eb85dd46fb6962a36a9357dbf31c3afb29 /indra/newview/llpanellandmarks.cpp
parent2d63d2044e0a00d1969c3da254e016a6e520c0d5 (diff)
parent035b1996df3f357b5060e3eb778588da5b9e7b37 (diff)
Merged in DV528-merge-6.5.5 (pull request #945)
DRTVWR-528 merge up to 6.5.5
Diffstat (limited to 'indra/newview/llpanellandmarks.cpp')
-rw-r--r--indra/newview/llpanellandmarks.cpp37
1 files changed, 28 insertions, 9 deletions
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index e698a61fef..ce17da3076 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -438,8 +438,14 @@ void LLLandmarksPanel::initLandmarksPanel(LLPlacesInventoryPanel* inventory_list
LLPlacesFolderView* root_folder = dynamic_cast<LLPlacesFolderView*>(inventory_list->getRootFolder());
if (root_folder)
{
- root_folder->setupMenuHandle(LLInventoryType::IT_CATEGORY, mGearFolderMenu->getHandle());
- root_folder->setupMenuHandle(LLInventoryType::IT_LANDMARK, mGearLandmarkMenu->getHandle());
+ if (mGearFolderMenu)
+ {
+ root_folder->setupMenuHandle(LLInventoryType::IT_CATEGORY, mGearFolderMenu->getHandle());
+ }
+ if (mGearLandmarkMenu)
+ {
+ root_folder->setupMenuHandle(LLInventoryType::IT_LANDMARK, mGearLandmarkMenu->getHandle());
+ }
root_folder->setParentLandmarksPanel(this);
}
@@ -462,13 +468,23 @@ void LLLandmarksPanel::initListCommandsHandlers()
mSortingMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_places_gear_sorting.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
mAddMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_place_add_button.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
- mGearLandmarkMenu->setVisibilityChangeCallback(boost::bind(&LLLandmarksPanel::onMenuVisibilityChange, this, _1, _2));
- mGearFolderMenu->setVisibilityChangeCallback(boost::bind(&LLLandmarksPanel::onMenuVisibilityChange, this, _1, _2));
+ if (mGearLandmarkMenu)
+ {
+ mGearLandmarkMenu->setVisibilityChangeCallback(boost::bind(&LLLandmarksPanel::onMenuVisibilityChange, this, _1, _2));
+ // show menus even if all items are disabled
+ mGearLandmarkMenu->setAlwaysShowMenu(TRUE);
+ } // Else corrupted files?
+
+ if (mGearFolderMenu)
+ {
+ mGearFolderMenu->setVisibilityChangeCallback(boost::bind(&LLLandmarksPanel::onMenuVisibilityChange, this, _1, _2));
+ mGearFolderMenu->setAlwaysShowMenu(TRUE);
+ }
- // show menus even if all items are disabled
- mGearLandmarkMenu->setAlwaysShowMenu(TRUE);
- mGearFolderMenu->setAlwaysShowMenu(TRUE);
- mAddMenu->setAlwaysShowMenu(TRUE);
+ if (mAddMenu)
+ {
+ mAddMenu->setAlwaysShowMenu(TRUE);
+ }
}
void LLLandmarksPanel::updateMenuVisibility(LLUICtrl* menu)
@@ -1054,7 +1070,10 @@ void LLLandmarksPanel::doShowOnMap(LLLandmark* landmark)
LLFloaterReg::showInstance("world_map", "center");
}
- mGearLandmarkMenu->setItemEnabled("show_on_map", TRUE);
+ if (mGearLandmarkMenu)
+ {
+ mGearLandmarkMenu->setItemEnabled("show_on_map", TRUE);
+ }
}
void LLLandmarksPanel::doProcessParcelInfo(LLLandmark* landmark,