Commit bcc1eb4e6c05f525ee4c2c3cc437e6c28fc6151f
Committed by
GitHub
1 parent
fde33225
Exists in
master
FIX: Bug in task navigator: unselecting image fiducial does not work (#350)
* current_coord is not actually used by Navigator class, in which it resided previously. Instead, it is used by NeuroNavigationPanel when an image fiducial is unselected (the button for selecting the image fiducial is pressed twice). Previously, unselecting an image fiducial caused a crash due to not having current_coord variable in NeuroNavigationPanel. This patch moves it there to fix the bug.
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
invesalius/gui/task_navigator.py
... | ... | @@ -320,7 +320,6 @@ class Navigation(): |
320 | 320 | |
321 | 321 | self.image_fiducials = np.full([3, 3], np.nan) |
322 | 322 | self.correg = None |
323 | - self.current_coord = 0, 0, 0 | |
324 | 323 | self.target = None |
325 | 324 | self.obj_reg = None |
326 | 325 | self.track_obj = False |
... | ... | @@ -719,6 +718,7 @@ class NeuronavigationPanel(wx.Panel): |
719 | 718 | |
720 | 719 | self.nav_status = False |
721 | 720 | self.tracker_fiducial_being_set = None |
721 | + self.current_coord = 0, 0, 0 | |
722 | 722 | |
723 | 723 | # Initialize list of buttons and numctrls for wx objects |
724 | 724 | self.btns_set_fiducial = [None, None, None, None, None, None] |
... | ... | @@ -981,7 +981,7 @@ class NeuronavigationPanel(wx.Panel): |
981 | 981 | |
982 | 982 | def UpdateImageCoordinates(self, position): |
983 | 983 | # TODO: Change from world coordinates to matrix coordinates. They are better for multi software communication. |
984 | - self.navigation.current_coord = position | |
984 | + self.current_coord = position | |
985 | 985 | |
986 | 986 | for m in [0, 1, 2]: |
987 | 987 | if not self.btns_set_fiducial[m].GetValue(): | ... | ... |