]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/lboxcmn.cpp
Use wxDCPenChanger instead of setting/resetting pen explicitly.
[wxWidgets.git] / src / common / lboxcmn.cpp
index f7d4fb91a8f7a91766c50765147b6bc93feccb7a..8787130451b1d615ddcc6cf04a15ff376dddfc09 100644 (file)
@@ -86,8 +86,15 @@ void wxListBoxBase::DeselectAll(int itemToLeaveSelected)
 
 void wxListBoxBase::UpdateOldSelections()
 {
+    // We need to remember the selection even in single-selection case on
+    // Windows, so that we don't send an event when the user clicks on an
+    // already selected item.
+#ifndef __WXMSW__
     if (HasFlag(wxLB_MULTIPLE) || HasFlag(wxLB_EXTENDED))
+#endif
+    {
         GetSelections( m_oldSelections );
+    }
 }
 
 bool wxListBoxBase::SendEvent(wxEventType evtType, int item, bool selected)