]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/vlbox.cpp
More bakfile changes needed for bmpcbox. Rebaked.
[wxWidgets.git] / src / generic / vlbox.cpp
index d53213a28491dc94e142b608157e1ecd16973e21..7cdf248b6a21ef596425b6fdfb9d31156b87271d 100644 (file)
 
 #if wxUSE_LISTBOX
 
+#include "wx/vlbox.h"
+
 #ifndef WX_PRECOMP
     #include "wx/settings.h"
     #include "wx/dcclient.h"
+    #include "wx/listbox.h"
 #endif //WX_PRECOMP
 
-#include "wx/vlbox.h"
 #include "wx/dcbuffer.h"
 #include "wx/selstore.h"
 
@@ -92,7 +94,7 @@ bool wxVListBox::Create(wxWindow *parent,
 
 wxVListBox::~wxVListBox()
 {
-    delete m_doubleBuffer;    
+    delete m_doubleBuffer;
     delete m_selStore;
 }
 
@@ -262,7 +264,10 @@ void wxVListBox::SetSelection(int selection)
 
     if ( HasMultipleSelection() )
     {
-        Select(selection);
+        if (selection != wxNOT_FOUND)
+            Select(selection);
+        else
+            DeselectAll();
         m_anchor = selection;
     }
 
@@ -645,8 +650,6 @@ void wxVListBox::OnLeftDClick(wxMouseEvent& eventMouse)
 // use the same default attributes as wxListBox
 // ----------------------------------------------------------------------------
 
-#include "wx/listbox.h"
-
 //static
 wxVisualAttributes
 wxVListBox::GetClassDefaultAttributes(wxWindowVariant variant)