Configtool: don't color heater/sensor list items.
Validation is no longer required, as we now validate in the creation dialog already. And coloring one item in a two-item list almost looks like this item were highlighted.
This commit is contained in:
parent
b3bc26c6f4
commit
0f5990b2eb
|
|
@ -24,11 +24,6 @@ class HeaterList(wx.ListCtrl):
|
|||
|
||||
self.SetItemCount(0)
|
||||
|
||||
self.attr2 = wx.ListItemAttr()
|
||||
self.attr2.SetBackgroundColour("light blue")
|
||||
self.attr3 = wx.ListItemAttr()
|
||||
self.attr3.SetBackgroundColour("pink")
|
||||
|
||||
self.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnItemSelected)
|
||||
self.Bind(wx.EVT_LIST_ITEM_DESELECTED, self.OnItemDeselected)
|
||||
|
||||
|
|
@ -82,12 +77,3 @@ class HeaterList(wx.ListCtrl):
|
|||
return "True"
|
||||
else:
|
||||
return "False"
|
||||
|
||||
def OnGetItemAttr(self, item):
|
||||
if not self.valid[item]:
|
||||
return self.attr3
|
||||
|
||||
if item % 2 == 1:
|
||||
return self.attr2
|
||||
else:
|
||||
return None
|
||||
|
|
|
|||
|
|
@ -27,11 +27,6 @@ class SensorList(wx.ListCtrl):
|
|||
|
||||
self.SetItemCount(0)
|
||||
|
||||
self.attr2 = wx.ListItemAttr()
|
||||
self.attr2.SetBackgroundColour("light blue")
|
||||
self.attr3 = wx.ListItemAttr()
|
||||
self.attr3.SetBackgroundColour("pink")
|
||||
|
||||
self.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnItemSelected)
|
||||
self.Bind(wx.EVT_LIST_ITEM_DESELECTED, self.OnItemDeselected)
|
||||
|
||||
|
|
@ -89,12 +84,3 @@ class SensorList(wx.ListCtrl):
|
|||
return ""
|
||||
else:
|
||||
return "[%s]" % (", ".join(s[3]))
|
||||
|
||||
def OnGetItemAttr(self, item):
|
||||
if not self.valid[item]:
|
||||
return self.attr3
|
||||
|
||||
if item % 2 == 1:
|
||||
return self.attr2
|
||||
else:
|
||||
return None
|
||||
|
|
|
|||
Loading…
Reference in New Issue