diff --git a/wxPython/src/gtk/_controls.py b/wxPython/src/gtk/_controls.py index 8a966db284..8e84e2809b 100644 --- a/wxPython/src/gtk/_controls.py +++ b/wxPython/src/gtk/_controls.py @@ -4822,7 +4822,7 @@ class ListCtrl(_core.Control): 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) diff --git a/wxPython/src/mac/_controls.py b/wxPython/src/mac/_controls.py index 0263983d14..20ad8a4c30 100644 --- a/wxPython/src/mac/_controls.py +++ b/wxPython/src/mac/_controls.py @@ -4809,7 +4809,7 @@ class ListCtrl(_core.Control): 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) diff --git a/wxPython/src/msw/_controls.py b/wxPython/src/msw/_controls.py index 8ec9af9c3e..caabd82c1c 100644 --- a/wxPython/src/msw/_controls.py +++ b/wxPython/src/msw/_controls.py @@ -4834,7 +4834,7 @@ class ListCtrl(_core.Control): 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)