From 08e2c5707802f0b17620474f3794ab1528de0739 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 1 Mar 2005 23:36:05 +0000 Subject: [PATCH] Make IsSelected be a bit more specific git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32544 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/_listctrl.i | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wxPython/src/_listctrl.i b/wxPython/src/_listctrl.i index 48a9f0ac31..861e103621 100644 --- a/wxPython/src/_listctrl.i +++ b/wxPython/src/_listctrl.i @@ -717,7 +717,7 @@ details in the second return value (see wx.LIST_HITTEST flags.)", ""); def IsSelected(self, idx): '''return True if the item is selected''' - return self.GetItemState(idx, wx.LIST_STATE_SELECTED) != 0 + return (self.GetItemState(idx, wx.LIST_STATE_SELECTED) & wx.LIST_STATE_SELECTED) != 0 def SetColumnImage(self, col, image): item = self.GetColumn(col) -- 2.49.0