Fix abort in wxColour_helper on OpenSUSE
This replaces "" strings that cause aborts in python-wxWidgets wxColour_helper with Python None objects. This corrects an abort where the helper tries to fetch the first byte of the colour string even when it's 0 length.master
parent
2090124e16
commit
2aac06f9da
|
@ -283,16 +283,16 @@ class PronterWindow(MainWindow, pronsole.pronsole):
|
||||||
if f>0:
|
if f>0:
|
||||||
wx.CallAfter(self.btemp.SetValue, str(f))
|
wx.CallAfter(self.btemp.SetValue, str(f))
|
||||||
self.set("last_bed_temperature", str(f))
|
self.set("last_bed_temperature", str(f))
|
||||||
wx.CallAfter(self.setboff.SetBackgroundColour, "")
|
wx.CallAfter(self.setboff.SetBackgroundColour, None)
|
||||||
wx.CallAfter(self.setboff.SetForegroundColour, "")
|
wx.CallAfter(self.setboff.SetForegroundColour, None)
|
||||||
wx.CallAfter(self.setbbtn.SetBackgroundColour, "#FFAA66")
|
wx.CallAfter(self.setbbtn.SetBackgroundColour, "#FFAA66")
|
||||||
wx.CallAfter(self.setbbtn.SetForegroundColour, "#660000")
|
wx.CallAfter(self.setbbtn.SetForegroundColour, "#660000")
|
||||||
wx.CallAfter(self.btemp.SetBackgroundColour, "#FFDABB")
|
wx.CallAfter(self.btemp.SetBackgroundColour, "#FFDABB")
|
||||||
else:
|
else:
|
||||||
wx.CallAfter(self.setboff.SetBackgroundColour, "#0044CC")
|
wx.CallAfter(self.setboff.SetBackgroundColour, "#0044CC")
|
||||||
wx.CallAfter(self.setboff.SetForegroundColour, "white")
|
wx.CallAfter(self.setboff.SetForegroundColour, "white")
|
||||||
wx.CallAfter(self.setbbtn.SetBackgroundColour, "")
|
wx.CallAfter(self.setbbtn.SetBackgroundColour, None)
|
||||||
wx.CallAfter(self.setbbtn.SetForegroundColour, "")
|
wx.CallAfter(self.setbbtn.SetForegroundColour, None)
|
||||||
wx.CallAfter(self.btemp.SetBackgroundColour, "white")
|
wx.CallAfter(self.btemp.SetBackgroundColour, "white")
|
||||||
wx.CallAfter(self.btemp.Refresh)
|
wx.CallAfter(self.btemp.Refresh)
|
||||||
|
|
||||||
|
@ -302,16 +302,16 @@ class PronterWindow(MainWindow, pronsole.pronsole):
|
||||||
if f > 0:
|
if f > 0:
|
||||||
wx.CallAfter(self.htemp.SetValue, str(f))
|
wx.CallAfter(self.htemp.SetValue, str(f))
|
||||||
self.set("last_temperature", str(f))
|
self.set("last_temperature", str(f))
|
||||||
wx.CallAfter(self.settoff.SetBackgroundColour, "")
|
wx.CallAfter(self.settoff.SetBackgroundColour, None)
|
||||||
wx.CallAfter(self.settoff.SetForegroundColour, "")
|
wx.CallAfter(self.settoff.SetForegroundColour, None)
|
||||||
wx.CallAfter(self.settbtn.SetBackgroundColour, "#FFAA66")
|
wx.CallAfter(self.settbtn.SetBackgroundColour, "#FFAA66")
|
||||||
wx.CallAfter(self.settbtn.SetForegroundColour, "#660000")
|
wx.CallAfter(self.settbtn.SetForegroundColour, "#660000")
|
||||||
wx.CallAfter(self.htemp.SetBackgroundColour, "#FFDABB")
|
wx.CallAfter(self.htemp.SetBackgroundColour, "#FFDABB")
|
||||||
else:
|
else:
|
||||||
wx.CallAfter(self.settoff.SetBackgroundColour, "#0044CC")
|
wx.CallAfter(self.settoff.SetBackgroundColour, "#0044CC")
|
||||||
wx.CallAfter(self.settoff.SetForegroundColour, "white")
|
wx.CallAfter(self.settoff.SetForegroundColour, "white")
|
||||||
wx.CallAfter(self.settbtn.SetBackgroundColour, "")
|
wx.CallAfter(self.settbtn.SetBackgroundColour, None)
|
||||||
wx.CallAfter(self.settbtn.SetForegroundColour, "")
|
wx.CallAfter(self.settbtn.SetForegroundColour, None)
|
||||||
wx.CallAfter(self.htemp.SetBackgroundColour, "white")
|
wx.CallAfter(self.htemp.SetBackgroundColour, "white")
|
||||||
wx.CallAfter(self.htemp.Refresh)
|
wx.CallAfter(self.htemp.Refresh)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue