]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/listctrl.cpp
reset m_selectionOld when the selection is programatically changed
[wxWidgets.git] / src / msw / listctrl.cpp
index d933639972a2364658160e649a19fe3eb3aa4e7a..0d5621a969a2bb22e01cf19d518a4debe8158f77 100644 (file)
@@ -480,6 +480,8 @@ void wxListCtrl::FreeAllInternalData()
         m_ignoreChangeMessages = false;
 
         m_AnyInternalData = false;
         m_ignoreChangeMessages = false;
 
         m_AnyInternalData = false;
+
+        m_count = 0;
     }
 }
 
     }
 }
 
@@ -1917,7 +1919,6 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
                 break;
 
             case LVN_DELETEALLITEMS:
                 break;
 
             case LVN_DELETEALLITEMS:
-                m_count = 0;
                 eventType = wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS;
                 event.m_itemIndex = -1;
                 break;
                 eventType = wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS;
                 event.m_itemIndex = -1;
                 break;