diff options
author | Merov Linden <merov@lindenlab.com> | 2013-01-30 20:01:03 -0800 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2013-01-30 20:01:03 -0800 |
commit | faae38daaaf30fd96b217316cf3eafb095ff35bc (patch) | |
tree | e73c2991dcfffa2c4d4260fff6102d65be1e1312 /indra/newview/llpanellandmarks.cpp | |
parent | 6af899f19e246c7fe4faa1edcdfbcfe9f01dbd25 (diff) | |
parent | e7c0f69c8e0509d822c6f7410bc0d5bb10fde522 (diff) |
Pull merge from lindenlab/viewer-developement
Diffstat (limited to 'indra/newview/llpanellandmarks.cpp')
-rw-r--r-- | indra/newview/llpanellandmarks.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 469656c33f..88400e4ef2 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -405,13 +405,13 @@ void LLLandmarksPanel::setItemSelected(const LLUUID& obj_id, BOOL take_keyboard_ bool LLLandmarksPanel::isLandmarkSelected() const { LLFolderViewModelItemInventory* current_item = getCurSelectedViewModelItem(); + return current_item && (current_item->getInventoryType() == LLInventoryType::IT_LANDMARK); +} - if(current_item && current_item->getInventoryType() == LLInventoryType::IT_LANDMARK) - { - return true; - } - - return false; +bool LLLandmarksPanel::isFolderSelected() const +{ + LLFolderViewModelItemInventory* current_item = getCurSelectedViewModelItem(); + return current_item && (current_item->getInventoryType() == LLInventoryType::IT_CATEGORY); } bool LLLandmarksPanel::isReceivedFolderSelected() const @@ -709,7 +709,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); |