summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2010-10-11 14:33:29 -0700
committerMerov Linden <merov@lindenlab.com>2010-10-11 14:33:29 -0700
commitbf74882b429687b113da9784189790ddb3f8cef4 (patch)
tree51ddcc0a44a43542a446e7a4e75565184628109b /indra
parent4859a40055fa4b8c15b82466dee1b37884d54902 (diff)
parentc3b9ed68cfa988ddbbcfae36be04d4a8e69c1983 (diff)
STORM-296 : merge to viewer-beta
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llplacesinventorypanel.cpp18
-rw-r--r--indra/newview/llplacesinventorypanel.h6
2 files changed, 24 insertions, 0 deletions
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<LLView> menu_handle)
{
mMenuHandlesByInventoryType[asset_type] = menu_handle;
diff --git a/indra/newview/llplacesinventorypanel.h b/indra/newview/llplacesinventorypanel.h
index 6641871a0b..a44776d18b 100644
--- a/indra/newview/llplacesinventorypanel.h
+++ b/indra/newview/llplacesinventorypanel.h
@@ -70,6 +70,12 @@ public:
*/
/*virtual*/ BOOL handleRightMouseDown( S32 x, S32 y, MASK mask );
+ /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg);
+
void setupMenuHandle(LLInventoryType::EType asset_type, LLHandle<LLView> menu_handle);
void setParentLandmarksPanel(LLLandmarksPanel* panel)