Fix reference before assignment

Fix issue where textWidth can be referenced before it is actually assigned.
This commit is contained in:
facelessuser
2017-07-26 22:13:52 -06:00
parent a312eef892
commit 04c97c176d

View File

@@ -317,7 +317,7 @@ class ToolTipWindowBase(object):
# We got the header text
dc.SetFont(headerFont)
textWidth, textHeight = dc.GetTextExtent(header)
maxWidth = max(bmpWidth+(textWidth+self._spacing*3), maxWidth)
maxWidth = max(bmpWidth+(textWidth+self._spacing*3), maxWidth)
# Calculate the header height
height = max(textHeight, bmpHeight)
if header: