Commit 89539bc33337056b1af3dd9b9090cf9629ced41a

Authored by Thiago Franco de Moraes
1 parent ef2bee9c
Exists in master

Working better with windows

Showing 1 changed file with 3 additions and 1 deletions   Show diff stats
invesalius/gui/data_notebook.py
... ... @@ -359,7 +359,7 @@ class InvListCtrl(wx.ListCtrl):
359 359 self.__bind_events_wx()
360 360  
361 361 def __bind_events_wx(self):
362   - self.Bind(wx.EVT_LEFT_UP, self.OnClickItem)
  362 + self.Bind(wx.EVT_LEFT_DOWN, self.OnClickItem)
363 363 self.Bind(wx.EVT_LEFT_DCLICK, self.OnDblClickItem)
364 364  
365 365 def CreateColourBitmap(self, colour):
... ... @@ -394,6 +394,7 @@ class InvListCtrl(wx.ListCtrl):
394 394 flag = not bool(item.GetImage())
395 395 self.SetItemImage(item_idx, int(flag))
396 396 self.OnCheckItem(item_idx, flag)
  397 + return
397 398 evt.Skip()
398 399  
399 400 def OnDblClickItem(self, evt):
... ... @@ -404,6 +405,7 @@ class InvListCtrl(wx.ListCtrl):
404 405 if column_clicked == 1:
405 406 item = self.GetItem(item_idx, 1)
406 407 self.enter_edition(item)
  408 + return
407 409 evt.Skip()
408 410  
409 411 def enter_edition(self, item):
... ...