Do not show tooltip window if tooltip is None or ''

This commit is contained in:
HomeWorld
2012-03-19 06:28:50 +02:00
parent 9666276cb0
commit cdf5731d66

View File

@@ -170,15 +170,21 @@ class FittingView(d.Display):
# self.tooltip.SetTip(tooltip)
# self.tooltip.Enable(True)
if self.toolTipWindow is None:
self.toolTipWindow = PFToolTipWindow(self, (mx+3, my+3), tooltip)
self.toolTipWindow.Show()
if tooltip is not None and tooltip != "":
self.toolTipWindow = PFToolTipWindow(self, (mx+3, my+3), tooltip)
self.toolTipWindow.Show()
else:
self.toolTipWindow = None
else:
if self.lastRow != row:
self.lastRow = row
self.toolTipWindow.Show(False)
del self.toolTipWindow
self.toolTipWindow = PFToolTipWindow(self, (mx+3, my+3), tooltip)
self.toolTipWindow.Show()
if tooltip is not None and tooltip != "":
self.toolTipWindow = PFToolTipWindow(self, (mx+3, my+3), tooltip)
self.toolTipWindow.Show()
else:
self.toolTipWindow = None
else:
if self.toolTipWindow: