summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindra/newview/llinventorybridge.cpp9
-rwxr-xr-xindra/newview/llinventoryfunctions.cpp3
-rwxr-xr-xindra/newview/llmarketplacefunctions.cpp7
-rwxr-xr-xindra/newview/llmarketplacefunctions.h1
4 files changed, 15 insertions, 5 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index ad462648c1..51d1f088e0 100755
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -271,7 +271,8 @@ BOOL LLInvFVBridge::cutToClipboard()
const LLUUID &marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false);
const BOOL cut_from_marketplacelistings = gInventory.isObjectDescendentOf(mUUID, marketplacelistings_id);
- if (cut_from_marketplacelistings && LLMarketplaceData::instance().isInActiveFolder(mUUID))
+ if (cut_from_marketplacelistings && (LLMarketplaceData::instance().isInActiveFolder(mUUID) ||
+ LLMarketplaceData::instance().isListedAndActive(mUUID)))
{
// Prompt the user if cutting from a marketplace active listing
LLNotificationsUtil::add("ConfirmMerchantActiveChange", LLSD(), LLSD(), boost::bind(&LLInvFVBridge::callback_cutToClipboard, this, _1, _2));
@@ -2493,7 +2494,8 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
// Dropping in or out of marketplace needs (sometimes) confirmation
if (user_confirm && (move_is_from_marketplacelistings || move_is_into_marketplacelistings))
{
- if (move_is_from_marketplacelistings && LLMarketplaceData::instance().isInActiveFolder(cat_id))
+ if (move_is_from_marketplacelistings && (LLMarketplaceData::instance().isInActiveFolder(cat_id) ||
+ LLMarketplaceData::instance().isListedAndActive(cat_id)))
{
if (LLMarketplaceData::instance().isListed(cat_id) || LLMarketplaceData::instance().isVersionFolder(cat_id))
{
@@ -4283,7 +4285,8 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
// Dropping in or out of marketplace needs (sometimes) confirmation
if (user_confirm && (move_is_from_marketplacelistings || move_is_into_marketplacelistings))
{
- if ((move_is_from_marketplacelistings && LLMarketplaceData::instance().isInActiveFolder(inv_item->getUUID())) ||
+ if ((move_is_from_marketplacelistings && (LLMarketplaceData::instance().isInActiveFolder(inv_item->getUUID())
+ || LLMarketplaceData::instance().isListedAndActive(inv_item->getUUID()))) ||
(move_is_into_marketplacelistings && LLMarketplaceData::instance().isInActiveFolder(mUUID)))
{
LLNotificationsUtil::add("ConfirmMerchantActiveChange", LLSD(), LLSD(), boost::bind(&LLFolderBridge::callback_dropItemIntoFolder, this, _1, _2, inv_item));
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 98f74bb1a6..8ea8e5998e 100755
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -1973,7 +1973,8 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
}
// Note: we do not prompt for change when opening items (e.g. textures or note cards) on the marketplace...
}
- else if (LLMarketplaceData::instance().isInActiveFolder(viewModel->getUUID()))
+ else if (LLMarketplaceData::instance().isInActiveFolder(viewModel->getUUID()) ||
+ LLMarketplaceData::instance().isListedAndActive(viewModel->getUUID()))
{
// If item is in active listing, further confirmation is required
if ((("cut" == action) || ("delete" == action)) && (LLMarketplaceData::instance().isListed(viewModel->getUUID()) || LLMarketplaceData::instance().isVersionFolder(viewModel->getUUID())))
diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp
index b37ae30021..a23295ec20 100755
--- a/indra/newview/llmarketplacefunctions.cpp
+++ b/indra/newview/llmarketplacefunctions.cpp
@@ -1431,6 +1431,11 @@ bool LLMarketplaceData::isListed(const LLUUID& folder_id)
return (it != mMarketplaceItems.end());
}
+bool LLMarketplaceData::isListedAndActive(const LLUUID& folder_id)
+{
+ return (isListed(folder_id) && getActivationState(folder_id));
+}
+
bool LLMarketplaceData::isVersionFolder(const LLUUID& folder_id)
{
marketplace_items_list_t::iterator it = mMarketplaceItems.begin();
@@ -1451,7 +1456,7 @@ bool LLMarketplaceData::isInActiveFolder(const LLUUID& obj_id)
LLUUID listing_uuid = nested_parent_id(obj_id, depth);
bool active = getActivationState(listing_uuid);
LLUUID version_uuid = getVersionFolder(listing_uuid);
- return (active && ((obj_id == listing_uuid) || (obj_id == version_uuid) || gInventory.isObjectDescendentOf(obj_id, version_uuid)));
+ return (active && ((obj_id == version_uuid) || gInventory.isObjectDescendentOf(obj_id, version_uuid)));
}
// Private Modifiers
diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h
index fd3d9ccfdb..e40eca9176 100755
--- a/indra/newview/llmarketplacefunctions.h
+++ b/indra/newview/llmarketplacefunctions.h
@@ -197,6 +197,7 @@ public:
// Probe the Marketplace data set to identify folders
bool isListed(const LLUUID& folder_id); // returns true if folder_id is a Listing folder
+ bool isListedAndActive(const LLUUID& folder_id); // returns true if folder_id is an active (listed) Listing folder
bool isVersionFolder(const LLUUID& folder_id); // returns true if folder_id is a Version folder
bool isInActiveFolder(const LLUUID& obj_id); // returns true if the obj_id is buried in an active version folder