Skip to content

Commit

Permalink
Show/Hide the fixed target coil when 'Show coil' button is pressed
Browse files Browse the repository at this point in the history
  • Loading branch information
Tolonen Luka committed Oct 5, 2024
1 parent 4bf9d32 commit a6c4435
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions invesalius/data/visualization/coil_visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ def ShowCoil(self, state, coil_name=None):
for coil in self.coils.values():
coil["actor"].SetVisibility(state)
coil["center_actor"].SetVisibility(True) # Always show the center donut actor
if self.target_coil_actor is not None: # LUKATODO: target mode...
self.target_coil_actor.SetVisibility(True) # Keep target visible for now

elif (coil := self.coils.get(coil_name, None)) is not None:
# Just toggle the visibility when dealing with specific coils
Expand All @@ -139,6 +137,8 @@ def ShowCoil(self, state, coil_name=None):
elif all(coils_visible): # all coils are shown
Publisher.sendMessage("Press show-coil button", pressed=True)

if self.target_coil_actor is not None:
self.target_coil_actor.SetVisibility(state)
# self.vector_field_assembly.SetVisibility(state) # LUKATODO: Keep this hidden for now

if not self.is_navigating:
Expand Down

0 comments on commit a6c4435

Please sign in to comment.