summaryrefslogtreecommitdiff
path: root/indra/newview/llpanellandmarks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanellandmarks.cpp')
-rw-r--r--indra/newview/llpanellandmarks.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index 68a3b6d1cd..d6fccb9705 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -418,12 +418,13 @@ void LLLandmarksPanel::setItemSelected(const LLUUID& obj_id, BOOL take_keyboard_
bool LLLandmarksPanel::isLandmarkSelected() const
{
LLFolderViewItem* current_item = getCurSelectedItem();
- if(current_item && current_item->getListener()->getInventoryType() == LLInventoryType::IT_LANDMARK)
- {
- return true;
- }
+ return current_item && current_item->getListener()->getInventoryType() == LLInventoryType::IT_LANDMARK;
+}
- return false;
+bool LLLandmarksPanel::isFolderSelected() const
+{
+ LLFolderViewItem* current_item = getCurSelectedItem();
+ return current_item && current_item->getListener()->getInventoryType() == LLInventoryType::IT_CATEGORY;
}
bool LLLandmarksPanel::isReceivedFolderSelected() const
@@ -720,7 +721,7 @@ void LLLandmarksPanel::initListCommandsHandlers()
void LLLandmarksPanel::updateListCommands()
{
bool add_folder_enabled = isActionEnabled("category");
- bool trash_enabled = isActionEnabled("delete");
+ bool trash_enabled = isActionEnabled("delete") && (isFolderSelected() || isLandmarkSelected());
// keep Options & Add Landmark buttons always enabled
mListCommands->getChildView(ADD_FOLDER_BUTTON_NAME)->setEnabled(add_folder_enabled);