Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions PYME/DSView/eventLogViewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,13 @@ def DoPaint(self, dc):
cmapping = c[1]
sourceEv = c[2]

# this was done above in another chart loop but omitted here
# QUESTION: isn't there a better solution to the byte/string handling of event logs
# that is more transparent and less error prone than this encode/decode hacking?
# we also have the byte literal quotes in the event log viewer this way (which is not necessarily pretty)
if not isinstance(sourceEv, bytes):
sourceEv = sourceEv.encode()

dc.SetTextForeground(self.lineColours[sourceEv])

dc.DrawText(cname, x4 + chartWidth/2 - dc.GetTextExtent(cname)[0]/2, 0)
Expand Down