Commit 9abcd9d1f76bdd58379fcff15763bc55b7d42085
Committed by
Thiago Franco de Moraes
1 parent
4c76cb6a
Exists in
master
and in
4 other branches
Fixed 'remove marker' bug (#84)
Showing
1 changed file
with
7 additions
and
5 deletions
Show diff stats
invesalius/gui/task_navigator.py
... | ... | @@ -676,13 +676,15 @@ class MarkersPanel(wx.Panel): |
676 | 676 | self.lc.Focus(item.GetId()) |
677 | 677 | index = [self.lc.GetFocusedItem()] |
678 | 678 | else: |
679 | - if self.lc.GetFocusedItem() is not -1: | |
679 | + if self.lc.GetFirstSelected() is not -1: | |
680 | 680 | index = self.GetSelectedItems() |
681 | - elif not self.lc.GetItemCount(): | |
682 | - pass | |
683 | 681 | else: |
684 | - dlg.NoMarkerSelected() | |
685 | - self.DeleteMarker(index) | |
682 | + index = None | |
683 | + | |
684 | + if index: | |
685 | + self.DeleteMarker(index) | |
686 | + else: | |
687 | + dlg.NoMarkerSelected() | |
686 | 688 | |
687 | 689 | def DeleteMarker(self, index): |
688 | 690 | for i in reversed(index): | ... | ... |