Skip to content

Commit

Permalink
Remove behavior where probe is automatically shown/hidden when naviga…
Browse files Browse the repository at this point in the history
…tion is started/stopped. Automatically show coil/probe when Track coil is pressed/unpressed
  • Loading branch information
Tolonen Luka committed Jul 23, 2024
1 parent 7b212f7 commit 62ed00e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
8 changes: 0 additions & 8 deletions invesalius/data/visualization/probe_visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@ def __init__(self, renderer, interactor):
def __bind_events(self):
Publisher.subscribe(self.ShowProbe, "Show probe in viewer volume")
Publisher.subscribe(self.UpdateProbePose, "Update probe pose")
Publisher.subscribe(self.OnNavigationStatus, "Navigation status")

def OnNavigationStatus(self, nav_status, vis_status):
self.is_navigating = nav_status # show probe when start navigation
if self.probe_actor is not None: # and hide it when stop navigation
Publisher.sendMessage("Press show-probe button", pressed=nav_status)
self.ShowProbe(self.is_navigating)
self.interactor.Render()

def ShowProbe(self, state):
self.show_probe = state
Expand Down
3 changes: 2 additions & 1 deletion invesalius/gui/task_navigator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1768,8 +1768,9 @@ def OnTrackObjectButton(self, evt=None, ctrl=None):
if not pressed:
Publisher.sendMessage("Press target mode button", pressed=pressed)

# Automatically press or unpress 'Show coil' button.
# Automatically press or unpress 'Show coil' and 'Show probe' button.
Publisher.sendMessage("Press show-coil button", pressed=pressed)
Publisher.sendMessage("Press show-probe button", pressed=(not pressed))

self.SaveConfig()

Expand Down

0 comments on commit 62ed00e

Please sign in to comment.