Merov Linden avatar Merov Linden committed e5f5ad4 Merge

STORM-296 : merge to viewer-beta

Comments (0)

Files changed (2)

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;

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)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.