ignore wrong colour spec
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38469 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		@@ -211,8 +211,11 @@ class ParamColour(PPanel):
 | 
				
			|||||||
        self.freeze = True
 | 
					        self.freeze = True
 | 
				
			||||||
        if not value: value = '#FFFFFF'
 | 
					        if not value: value = '#FFFFFF'
 | 
				
			||||||
        self.text.SetValue(str(value))  # update text ctrl
 | 
					        self.text.SetValue(str(value))  # update text ctrl
 | 
				
			||||||
 | 
					        try:
 | 
				
			||||||
            colour = wxColour(int(value[1:3], 16), int(value[3:5], 16), int(value[5:7], 16))
 | 
					            colour = wxColour(int(value[1:3], 16), int(value[3:5], 16), int(value[5:7], 16))
 | 
				
			||||||
            self.button.SetBackgroundColour(colour)
 | 
					            self.button.SetBackgroundColour(colour)
 | 
				
			||||||
 | 
					        except:                         # ignore errors
 | 
				
			||||||
 | 
					            pass
 | 
				
			||||||
        self.button.Refresh()
 | 
					        self.button.Refresh()
 | 
				
			||||||
        self.freeze = False
 | 
					        self.freeze = False
 | 
				
			||||||
    def OnPaintButton(self, evt):
 | 
					    def OnPaintButton(self, evt):
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user