]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied [ 866603 ] Fixes the listctrl demo's 'Toggle' menu item
authorJulian Smart <julian@anthemion.co.uk>
Thu, 8 Jan 2004 08:43:16 +0000 (08:43 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 8 Jan 2004 08:43:16 +0000 (08:43 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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))