[Gd-chatter] r10946 - trunk/fundev/sources/duim/win32

hannes at gwydiondylan.org hannes at gwydiondylan.org
Wed Nov 8 00:00:22 CET 2006


Author: hannes
Date: Wed Nov  8 00:00:20 2006
New Revision: 10946

Modified:
   trunk/fundev/sources/duim/win32/wcontrols.dylan
Log:
Job: minor
*fix updating of list view if new-items is smaller than current-items

Modified: trunk/fundev/sources/duim/win32/wcontrols.dylan
==============================================================================
--- trunk/fundev/sources/duim/win32/wcontrols.dylan	(original)
+++ trunk/fundev/sources/duim/win32/wcontrols.dylan	Wed Nov  8 00:00:20 2006
@@ -1207,8 +1207,8 @@
         // The analog of the insertion case, except that we delete
         // just enough items and fix the remaining ones in place
         let delta :: <integer> = n-items - n-objects;
-        for (object in objects,
-             index :: <integer> from 0)
+        for (index :: <integer> from 0 below n-objects)
+          let object = objects[index];
           when (force?
                 | index >= n-items
                 | ~test(object, item-object(items[index])))
@@ -1219,6 +1219,7 @@
             else
               remove-at!(items, index);
               SendMessage(handle, $LVM-DELETEITEM, index, 0);
+              dec!(index);
               dec!(n-items);
               dec!(delta)
             end



More information about the chatter mailing list