Commits

Merov Linden  committed e5f5ad4 Merge

STORM-296 : merge to viewer-beta

  • Participants
  • Parent commits a81d63a, 330d0e9

Comments (0)

Files changed (2)

File indra/newview/llplacesinventorypanel.cpp

 	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;

File indra/newview/llplacesinventorypanel.h

 	 */
 	/*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)