From c3b9ed68cfa988ddbbcfae36be04d4a8e69c1983 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Thu, 7 Oct 2010 18:54:30 +0300 Subject: STORM-296 FIXED Item types that can be dropped to Places SP->My Landmarks restricted to landmarks and folders only. --- indra/newview/llplacesinventorypanel.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'indra/newview/llplacesinventorypanel.cpp') diff --git a/indra/newview/llplacesinventorypanel.cpp b/indra/newview/llplacesinventorypanel.cpp index 29e262199e..408270a1a0 100644 --- a/indra/newview/llplacesinventorypanel.cpp +++ b/indra/newview/llplacesinventorypanel.cpp @@ -205,6 +205,24 @@ BOOL LLPlacesFolderView::handleRightMouseDown(S32 x, S32 y, MASK mask) return LLFolderView::handleRightMouseDown(x, y, mask); } +BOOL LLPlacesFolderView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg) +{ + // Don't accept anything except landmarks and folders to be dropped + // in places folder view. See STORM-296. + if (cargo_type != DAD_LANDMARK && cargo_type != DAD_CATEGORY) + { + *accept = ACCEPT_NO; + return FALSE; + } + + return LLFolderView::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, + accept, tooltip_msg); +} + void LLPlacesFolderView::setupMenuHandle(LLInventoryType::EType asset_type, LLHandle menu_handle) { mMenuHandlesByInventoryType[asset_type] = menu_handle; -- cgit v1.2.3