[commit] r1268 - trunk/GME/GMEActiveBrowser

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Wed Apr 13 12:48:10 CDT 2011


Author: ksmyth
Date: Wed Apr 13 12:48:10 2011
New Revision: 1268

Log:
Fix GME-353: dont do selection for drag-n-drop targets

Modified:
   trunk/GME/GMEActiveBrowser/AggregateTreeCtrl.cpp

Modified: trunk/GME/GMEActiveBrowser/AggregateTreeCtrl.cpp
==============================================================================
--- trunk/GME/GMEActiveBrowser/AggregateTreeCtrl.cpp	Wed Apr 13 12:47:00 2011	(r1267)
+++ trunk/GME/GMEActiveBrowser/AggregateTreeCtrl.cpp	Wed Apr 13 12:48:10 2011	(r1268)
@@ -720,34 +720,11 @@
 
 BOOL CAggregateTreeCtrl::IsRelevantDropTarget(CPoint point,CImageList* pDragImageList)
 {
-	UINT uFlags;	
-	HTREEITEM hItem=HitTest(point, &uFlags);
+	UINT uFlags;
+	HTREEITEM hItem = HitTest(point, &uFlags);
 	
-	// Setting previously selected item to avoid blinking
-	// To avoid the the messed up window we have to turn off the drag image list
-
-	HTREEITEM hSelItem=GetSelectedItem();
-	if(GetSelectedCount()>1)hSelItem=NULL;
-
 	if ((hItem != NULL) && (TVHT_ONITEM & uFlags))
 	{
-		// Selecting
-		if(hItem!=hSelItem)
-		{
-			if(pDragImageList!=NULL)
-			{
-				pDragImageList->DragShowNolock(FALSE);
-				ClearSelection();
-				SelectItem(hItem);
-				pDragImageList->DragShowNolock(TRUE);
-			}
-			else
-			{
-				ClearSelection();
-				SelectItem(hItem);
-			}
-			
-		}
 		CMgaObjectProxy ObjectProxy;
 		if(m_MgaMap.LookupObjectProxy(hItem,ObjectProxy)) // If it is in the map
 		{
@@ -757,22 +734,6 @@
 			}
 		}		
 	}
-	else
-	{
-		if(GetSelectedCount()>1)
-		{
-			if(pDragImageList!=NULL)
-			{
-					pDragImageList->DragShowNolock(FALSE);
-					ClearSelection();				
-					pDragImageList->DragShowNolock(TRUE);
-			}
-			else
-			{
-				ClearSelection();		
-			}
-		}
-	}
 	return FALSE;
 }
 
@@ -796,7 +757,13 @@
 		_t = " COPY MERGE\r\n";
 	MGATREECTRL_LOGEVENT( _t);
 
-	HTREEITEM hItem= GetSelectedItem();
+	HTREEITEM hItem;
+	if (point.x == 0 && point.y == 0) {
+		hItem = GetSelectedItem();
+	} else {
+		hItem = HitTest(point);
+	}
+	
 	CMgaObjectProxy MgaObjectProxy;
 
 	if(hItem==NULL || !m_MgaMap.LookupObjectProxy(hItem,MgaObjectProxy))


More information about the gme-commit mailing list