diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-02-28 21:56:33 +0200 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-02-28 21:56:33 +0200 |
commit | f62579f29303b33ff331f3f0b0e8d4197755d279 (patch) | |
tree | 06744ee5ccb2280970c8eed3303db326fbd5c128 /indra/newview/llpanellandmarks.cpp | |
parent | 611869b1035ef5677335a33169fb99413a90c3a6 (diff) | |
parent | 6ca09a94554ec01f5c94ec60fffd01d7e33f3546 (diff) |
Merge branch 'master' into DRTVWR-548-maint-N
Diffstat (limited to 'indra/newview/llpanellandmarks.cpp')
-rw-r--r-- | indra/newview/llpanellandmarks.cpp | 37 |
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, |