diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2021-04-23 14:56:01 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2021-04-23 14:56:01 +0300 |
commit | 70bc98c4b0484a69ebb42717755b623bf9895e9f (patch) | |
tree | 7b65dc4e40133e2fc0f85a7728ad94f756e279d0 /indra/newview/llpanellandmarks.cpp | |
parent | a391cf9cbc0a53463db6d628c86a3477e7d8a8b8 (diff) |
SL-15144 FIXED The "Remove" button is enabled with no selection
Diffstat (limited to 'indra/newview/llpanellandmarks.cpp')
-rw-r--r-- | indra/newview/llpanellandmarks.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 769b060d93..e698a61fef 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -285,6 +285,10 @@ LLToggleableMenu* LLLandmarksPanel::getCreateMenu() void LLLandmarksPanel::updateVerbs() { + if (sRemoveBtn) + { + sRemoveBtn->setEnabled(isActionEnabled("delete") && (isFolderSelected() || isLandmarkSelected())); + } } void LLLandmarksPanel::setItemSelected(const LLUUID& obj_id, BOOL take_keyboard_focus) @@ -425,6 +429,7 @@ void LLLandmarksPanel::initLandmarksPanel(LLPlacesInventoryPanel* inventory_list { inventory_list->getFilter().setEmptyLookupMessage("PlacesNoMatchingItems"); inventory_list->setFilterTypes(0x1 << LLInventoryType::IT_LANDMARK); + inventory_list->setSelectCallback(boost::bind(&LLLandmarksPanel::updateVerbs, this)); inventory_list->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); bool sorting_order = gSavedSettings.getBOOL("LandmarksSortedByDate"); @@ -1032,6 +1037,7 @@ bool LLLandmarksPanel::handleDragAndDropToTrash(BOOL drop, EDragAndDropType carg break; } + updateVerbs(); return true; } |