From: Julian Smart Date: Thu, 8 Jan 2004 08:43:16 +0000 (+0000) Subject: Applied [ 866603 ] Fixes the listctrl demo's 'Toggle' menu item X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/95f913a9d6b8573a033d6beeecbba1227b3f17bb Applied [ 866603 ] Fixes the listctrl demo's 'Toggle' menu item git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/listctrl/listtest.cpp b/samples/listctrl/listtest.cpp index 8377d92ca4..dc9acf8eaa 100644 --- a/samples/listctrl/listtest.cpp +++ b/samples/listctrl/listtest.cpp @@ -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))