Commit 89539bc33337056b1af3dd9b9090cf9629ced41a
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,7 +359,7 @@ class InvListCtrl(wx.ListCtrl): | ||
359 | self.__bind_events_wx() | 359 | self.__bind_events_wx() |
360 | 360 | ||
361 | def __bind_events_wx(self): | 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 | self.Bind(wx.EVT_LEFT_DCLICK, self.OnDblClickItem) | 363 | self.Bind(wx.EVT_LEFT_DCLICK, self.OnDblClickItem) |
364 | 364 | ||
365 | def CreateColourBitmap(self, colour): | 365 | def CreateColourBitmap(self, colour): |
@@ -394,6 +394,7 @@ class InvListCtrl(wx.ListCtrl): | @@ -394,6 +394,7 @@ class InvListCtrl(wx.ListCtrl): | ||
394 | flag = not bool(item.GetImage()) | 394 | flag = not bool(item.GetImage()) |
395 | self.SetItemImage(item_idx, int(flag)) | 395 | self.SetItemImage(item_idx, int(flag)) |
396 | self.OnCheckItem(item_idx, flag) | 396 | self.OnCheckItem(item_idx, flag) |
397 | + return | ||
397 | evt.Skip() | 398 | evt.Skip() |
398 | 399 | ||
399 | def OnDblClickItem(self, evt): | 400 | def OnDblClickItem(self, evt): |
@@ -404,6 +405,7 @@ class InvListCtrl(wx.ListCtrl): | @@ -404,6 +405,7 @@ class InvListCtrl(wx.ListCtrl): | ||
404 | if column_clicked == 1: | 405 | if column_clicked == 1: |
405 | item = self.GetItem(item_idx, 1) | 406 | item = self.GetItem(item_idx, 1) |
406 | self.enter_edition(item) | 407 | self.enter_edition(item) |
408 | + return | ||
407 | evt.Skip() | 409 | evt.Skip() |
408 | 410 | ||
409 | def enter_edition(self, item): | 411 | def enter_edition(self, item): |