Listview T7

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This should fix the FTP Commander 'Access Violation'.
Carlos, can you please confirm?

ChangeLog
  When deleting an item, remove selection, don't add it!

--- dlls/comctl32/listview.c.T6	Fri Oct 18 19:11:13 2002
+++ dlls/comctl32/listview.c	Fri Oct 18 19:26:03 2002
@@ -4032,23 +4032,16 @@
 
   TRACE("(nItem=%d)\n", nItem);
 
+  /* remove selection, and focus */
+  item.state = 0;
+  item.stateMask = LVIS_SELECTED | LVIS_FOCUSED;
+  LISTVIEW_SetItemState(infoPtr, nItem, &item);
 
-  /* First, send LVN_DELETEITEM notification. */
+  /* send LVN_DELETEITEM notification. */
   ZeroMemory(&nmlv, sizeof (NMLISTVIEW));
   nmlv.iItem = nItem;
   notify_listview(infoPtr, LVN_DELETEITEM, &nmlv);
 
-  if (nItem == infoPtr->nFocusedItem)
-  {
-    infoPtr->nFocusedItem = -1;
-    SetRectEmpty(&infoPtr->rcFocus);
-  }
-
-  /* remove it from the selection range */
-  item.state = LVIS_SELECTED;
-  item.stateMask = LVIS_SELECTED;
-  LISTVIEW_SetItemState(infoPtr,nItem,&item);
-
   if (lStyle & LVS_OWNERDATA)
   {
     infoPtr->nItemCount--;



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux