summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfunctions.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-02-05 22:04:40 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2024-02-05 22:04:40 +0200
commite3e1672ac40dd4f1f4e458ed09cd7279f0a45fc3 (patch)
tree8e64e6074c11005fbb1dac606c176e4470de03e4 /indra/newview/llinventoryfunctions.cpp
parentaa52c852d600aa6b2ea17cdd86f53972c95cca4a (diff)
parent6762f60d78277cf27afd8353aa531afb26bd560c (diff)
Merge branch 'DRTVWR-599-maint-Z' into release/maint-yz
# Conflicts: # indra/newview/llchiclet.h
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rw-r--r--indra/newview/llinventoryfunctions.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 6662f14b12..5df9b71fc3 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -91,8 +91,6 @@
#include "llvoavatarself.h"
#include "llwearablelist.h"
-#include <boost/foreach.hpp>
-
BOOL LLInventoryState::sWearNewClothing = FALSE;
LLUUID LLInventoryState::sWearNewClothingTransactionID;
std::list<LLUUID> LLInventoryAction::sMarketplaceFolders;
@@ -2968,6 +2966,23 @@ bool get_selection_object_uuids(LLFolderView *root, uuid_vec_t& ids)
void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root, const std::string& action, BOOL user_confirm)
{
std::set<LLFolderViewItem*> selected_items = root->getSelectionList();
+ if (selected_items.empty()
+ && action != "wear"
+ && action != "wear_add"
+ && !isRemoveAction(action))
+ {
+ // Was item removed while user was checking menu?
+ // "wear" and removal exlusions are due to use of
+ // getInventorySelectedUUIDs() below
+ LL_WARNS("Inventory") << "Menu tried to operate on empty selection" << LL_ENDL;
+
+ if (("copy" == action) || ("cut" == action))
+ {
+ LLClipboard::instance().reset();
+ }
+
+ return;
+ }
// Prompt the user and check for authorization for some marketplace active listing edits
if (user_confirm && (("delete" == action) || ("cut" == action) || ("rename" == action) || ("properties" == action) || ("task_properties" == action) || ("open" == action)))