From 3b2c4140cf3371b3f4d2a0e1e2fe0a9ee26321a9 Mon Sep 17 00:00:00 2001 From: PChemGuy <12279399-PChemGuy@users.noreply.gitlab.co> Date: Sun, 4 Sep 2022 11:07:47 +0300 Subject: [PATCH] Missing required explicit float->int type casting Fixes missing type casting in the OwnerDrawnComboBox.py demo module. --- demo/OwnerDrawnComboBox.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/demo/OwnerDrawnComboBox.py b/demo/OwnerDrawnComboBox.py index dbbd3eac..8789e208 100644 --- a/demo/OwnerDrawnComboBox.py +++ b/demo/OwnerDrawnComboBox.py @@ -49,15 +49,15 @@ class PenStyleComboBox(wx.adv.OwnerDrawnComboBox): if flags & wx.adv.ODCB_PAINTING_CONTROL: # for painting the control itself - dc.DrawLine( r.x+5, int(r.y+r.height/2), r.x+r.width - 5, int(r.y+r.height/2) ) + dc.DrawLine( int(r.x+5), int(r.y+r.height/2), int(r.x+r.width) - 5, int(r.y+r.height/2) ) else: # for painting the items in the popup dc.DrawText(self.GetString( item ), - r.x + 3, + int(r.x + 3), int((r.y + 0) + ( (r.height/2) - dc.GetCharHeight() )/2) ) - dc.DrawLine( r.x+5, int(r.y+((r.height/4)*3)+1), r.x+r.width - 5, int(r.y+((r.height/4)*3)+1) ) + dc.DrawLine( int(r.x+5), int(r.y+((r.height/4)*3)+1), int(r.x+r.width - 5), int(r.y+((r.height/4)*3)+1) ) # Overridden from OwnerDrawnComboBox, called for drawing the