From 62ed00e9a3e8ed545c574c1e4abd520312df3192 Mon Sep 17 00:00:00 2001 From: Tolonen Luka Date: Tue, 23 Jul 2024 16:39:50 +0300 Subject: [PATCH] Remove behavior where probe is automatically shown/hidden when navigation is started/stopped. Automatically show coil/probe when Track coil is pressed/unpressed --- invesalius/data/visualization/probe_visualizer.py | 8 -------- invesalius/gui/task_navigator.py | 3 ++- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/invesalius/data/visualization/probe_visualizer.py b/invesalius/data/visualization/probe_visualizer.py index 4101a96cc..3627bf7b3 100644 --- a/invesalius/data/visualization/probe_visualizer.py +++ b/invesalius/data/visualization/probe_visualizer.py @@ -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 diff --git a/invesalius/gui/task_navigator.py b/invesalius/gui/task_navigator.py index dba3c5da4..00a699450 100644 --- a/invesalius/gui/task_navigator.py +++ b/invesalius/gui/task_navigator.py @@ -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()