From: Vadim Zeitlin <vadim@wxwidgets.org>
Date: Sat, 4 Mar 2006 20:42:54 +0000 (+0000)
Subject: deselect the current selection when the user clicks outside of any item
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9a6a4f6d5799f9cf0ed240b23f3422ad73623971

deselect the current selection when the user clicks outside of any item


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37800 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp
index fb4924f17e..41beca006a 100644
--- a/src/generic/listctrl.cpp
+++ b/src/generic/listctrl.cpp
@@ -2949,7 +2949,8 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
 
     if ( !hitResult )
     {
-        // outside of any item
+        // outside of any item, reset the selection and bail out
+        HighlightAll(false);
         return;
     }