summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2019-10-17 19:15:02 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2019-10-17 19:15:02 +0300
commitaab8ea7236e01f279c33eb1839ac2e0c4a1f9829 (patch)
treed6461853a97ac62ac3412a656336a9b6168365b6
parent96c78187c19352159e4bd1ea111a2764c13d01ea (diff)
SL-12121 FIXED Unable to delete folders from 'Marketplace listings'
-rw-r--r--indra/newview/llinventorybridge.cpp7
-rw-r--r--indra/newview/llmarketplacefunctions.cpp5
-rw-r--r--indra/newview/llmarketplacefunctions.h4
3 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 6d2d533c9d..16d39205fc 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2270,7 +2270,7 @@ public:
// Can be destroyed (or moved to trash)
BOOL LLFolderBridge::isItemRemovable() const
{
- if (!get_is_category_removable(getInventoryModel(), mUUID) || isMarketplaceListingsFolder())
+ if (!get_is_category_removable(getInventoryModel(), mUUID))
{
return FALSE;
}
@@ -2287,6 +2287,11 @@ BOOL LLFolderBridge::isItemRemovable() const
}
}
+ if (isMarketplaceListingsFolder() && (!LLMarketplaceData::instance().isSLMDataFetched() || LLMarketplaceData::instance().getActivationState(mUUID)))
+ {
+ return FALSE;
+ }
+
return TRUE;
}
diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp
index a0e19f2d19..26977593f4 100644
--- a/indra/newview/llmarketplacefunctions.cpp
+++ b/indra/newview/llmarketplacefunctions.cpp
@@ -1294,6 +1294,11 @@ void LLMarketplaceData::setSLMDataFetched(U32 status)
}
}
+bool LLMarketplaceData::isSLMDataFetched()
+{
+ return mMarketPlaceDataFetched == MarketplaceFetchCodes::MARKET_FETCH_DONE;
+}
+
// Creation / Deletion / Update
// Methods publicly called
bool LLMarketplaceData::createListing(const LLUUID& folder_id)
diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h
index ec312baca3..fee9225f77 100644
--- a/indra/newview/llmarketplacefunctions.h
+++ b/indra/newview/llmarketplacefunctions.h
@@ -204,7 +204,9 @@ public:
void setDataFetchedSignal(const status_updated_signal_t::slot_type& cb);
void setSLMDataFetched(U32 status);
U32 getSLMDataFetched() { return mMarketPlaceDataFetched; }
-
+
+ bool isSLMDataFetched();
+
// High level create/delete/set Marketplace data: each method returns true if the function succeeds, false if error
bool createListing(const LLUUID& folder_id);
bool activateListing(const LLUUID& folder_id, bool activate, S32 depth = -1);