Skip to content

Commit

Permalink
BUG: Fix bug with camera resetting
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner committed Oct 3, 2023
1 parent fd08b52 commit df931af
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion mne/viz/evoked_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ def __init__(
)
self._in_brain_figure = False

self._renderer.set_interaction(interaction)
self.plotter = self._renderer.plotter
self.interaction = interaction

Expand Down Expand Up @@ -243,6 +242,7 @@ def current_time_func():
subscribe(self, "contours", self._on_contours)

if not self._in_brain_figure:
self._renderer.set_interaction(interaction)
self._renderer.set_camera(azimuth=10, elevation=60, distance="auto")
self._renderer.show()

Expand Down
1 change: 0 additions & 1 deletion tutorials/visualization/20_ui_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
link(fig_brain, fig_field)
fig_brain.set_time(0.1) # updates both source estimate and field lines


########################################################################################
# Hooking a custom plot into the event system
# ===========================================
Expand Down

0 comments on commit df931af

Please sign in to comment.