Skip to content

Commit

Permalink
wxGUI/psmap: fix vector line map props dialog PenStyleComboBox widget…
Browse files Browse the repository at this point in the history
… drawing items (#3162)

Device context DrawTex() and DrawLine() method require input x, y
parameter argument type as integer type.
  • Loading branch information
tmszi committed Sep 19, 2023
1 parent ad3b2d1 commit d5db3ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gui/wxpython/psmap/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,13 @@ def OnDrawItem(self, dc, rect, item, flags):
dc.DrawText(
self.GetString(item),
r.x + 3,
(r.y + 0) + ((r.height / 2) - dc.GetCharHeight()) / 2,
int((r.y + 0) + ((r.height / 2) - dc.GetCharHeight()) / 2),
)
dc.DrawLine(
r.x + 5,
r.y + ((r.height / 4) * 3) + 1,
int(r.y + ((r.height / 4) * 3) + 1),
r.x + r.width - 5,
r.y + ((r.height / 4) * 3) + 1,
int(r.y + ((r.height / 4) * 3) + 1),
)

def OnDrawBackground(self, dc, rect, item, flags):
Expand Down

0 comments on commit d5db3ce

Please sign in to comment.