Skip to content

Commit

Permalink
wx.metadata/mdlib: fix wx.ListCtrl widget set tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
tmszi committed Jul 2, 2020
1 parent f819160 commit 9120f3f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions grass7/gui/wxpython/wx.metadata/mdlib/cswlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,10 +498,10 @@ def loadSettings(self):

def setTooltip(self, evt):
index = evt.GetIndex()
text = self.resultList.GetItem(index, 1)
text = text.GetText()

self.resultList.SetToolTip(wx.ToolTip(text))
if index > -1:
text = self.resultList.GetItem(index, 1)
text = text.GetText()
self.resultList.SetToolTip(wx.ToolTip(text))

def setBBoxGRASS(self, evt=None):
vdb = Module('g.region', flags='bg', stdout_=PIPE)
Expand Down

0 comments on commit 9120f3f

Please sign in to comment.