Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Improve vline #181

Merged
merged 14 commits into from
Aug 2, 2023
Prev Previous commit
Next Next commit
can't find better fix
  • Loading branch information
marsipu committed Aug 1, 2023
commit ad43ff75e6d62414cdacd14b6a16daa0ac1c1559
5 changes: 2 additions & 3 deletions mne_qt_browser/_pg_figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,6 @@ class VLineLabel(InfLineLabel):
"""Label of the vline displaying the time."""

def __init__(self, vline):
vline = weakref.ref(vline)
super().__init__(vline, text='{value:.3f} s', position=0.98,
fill=(0, 191, 0), color='k', movable=True)
marsipu marked this conversation as resolved.
Show resolved Hide resolved
self.cursorOffset = None
Expand Down Expand Up @@ -4717,10 +4716,10 @@ def closeEvent(self, event):
if getattr(self.mne, 'vline', None) is not None:
if self.mne.is_epochs:
for vl in self.mne.vline:
_disconnect(vl.sigPositionChangeFinished)
_disconnect(vl.sigPositionChangeFinished, allow_error=True)
self.mne.vline.clear()
else:
_disconnect(self.mne.vline.sigPositionChangeFinished)
_disconnect(self.mne.vline.sigPositionChangeFinished, allow_error=True)
marsipu marked this conversation as resolved.
Show resolved Hide resolved
marsipu marked this conversation as resolved.
Show resolved Hide resolved
if getattr(self, 'load_thread', None) is not None:
self.load_thread.clean()
self.load_thread = None
Expand Down
Loading