Update FCObjects.py

raises a ValueError instead of an AttributeError b/c self.Image is never set
This commit is contained in:
kg-2
2019-01-02 19:08:40 -08:00
committed by GitHub
parent b02def8ce6
commit f8add4de3f

View File

@@ -2135,6 +2135,8 @@ class ScaledBitmap(TextObjectMixin, DrawObject):
self.Image = Bitmap.ConvertToImage()
elif type(Bitmap) == wx.Image:
self.Image = Bitmap
else:
raise ValueError("'Bitmap' must be a wx.Bitmap or wx.Image object not %s" % type(Bitmap))
self.XY = XY
self.Height = Height