]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/listctrl/listtest.cpp
Fixed a compile error
[wxWidgets.git] / samples / listctrl / listtest.cpp
index 8377d92ca49ecb399dc29f3b467edea7fb12e291..dc9acf8eaaef62689d323836af7e73df459b82c0 100644 (file)
@@ -307,7 +307,7 @@ void MyFrame::OnFocusLast(wxCommandEvent& WXUNUSED(event))
 
 void MyFrame::OnToggleFirstSel(wxCommandEvent& WXUNUSED(event))
 {
-    m_listCtrl->SetItemState(0, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
+    m_listCtrl->SetItemState(0, (~m_listCtrl->GetItemState(0, wxLIST_STATE_SELECTED) ) & wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
 }
 
 void MyFrame::OnDeselectAll(wxCommandEvent& WXUNUSED(event))