Merge pull request #1048 from SilverViking/master

Fixed bug with image in floatcanvas incorrectly getting rescaled to zero width and height during frame resize.

(cherry picked from commit cb77b7cf89)
This commit is contained in:
Robin Dunn
2018-10-24 19:31:34 -07:00
parent e140aaaaab
commit 8045b3ade2

View File

@@ -2333,7 +2333,7 @@ class ScaledBitmap2(TextObjectMixin, DrawObject, ):
Hb = BBbitmap[1,1] - Yb
FullHeight = ScaleWorldToPixel(self.Height)[0]
scale = FullHeight / self.bmpWH[1]
scale = float(FullHeight) / float(self.bmpWH[1])
Ws = int(scale * Wb + 0.5) # add the 0.5 to round
Hs = int(scale * Hb + 0.5)
if (self.ScaledBitmap is None) or (self.ScaledBitmap[0] != (Xb, Yb, Wb, Hb, Ws, Ws) ):