diff --git a/mne_qt_browser/_pg_figure.py b/mne_qt_browser/_pg_figure.py index fa9812ec..c681aed8 100644 --- a/mne_qt_browser/_pg_figure.py +++ b/mne_qt_browser/_pg_figure.py @@ -1059,7 +1059,14 @@ def mousePressEvent(self, event): def mouseMoveEvent(self, event): """Customize mouse move events.""" - self._set_range_from_pos(event.pos()) + # This temporarily circumvents a bug, which only appears on windows + # and when pyqt>=5.14.2 is installed from conda-forge. + # It leads to receiving mouseMoveEvents all the time when the Mouse + # is moved through the OverviewBar, even when now MouseBUtton is + # pressed. Dragging the mouse on OverviewBar is then + # not possible anymore. + if not platform.system() == 'Windows': + self._set_range_from_pos(event.pos()) def _fit_bg_img(self): # Remove previous item from scene @@ -2890,7 +2897,7 @@ def _hidpi_mkPen(*args, **kwargs): if self.mne.use_opengl is None: # default: opt-in # OpenGL needs to be enabled on macOS # (https://github.com/mne-tools/mne-qt-browser/issues/53) - default = 'true' if sys.platform == 'darwin' else '' + default = 'true' if platform.system() == 'Darwin' else '' config_val = get_config(opengl_key, default).lower() self.mne.use_opengl = (config_val == 'true') @@ -2902,7 +2909,7 @@ def _hidpi_mkPen(*args, **kwargs): # it can lead to segfaults. If a user really knows what they # are doing, they can pass use_opengl=False (or set # MNE_BROWSER_USE_OPENGL=false) - if sys.platform == 'darwin': + if platform.system() == 'Darwin': raise RuntimeError( 'Plotting on macOS without OpenGL may be unstable! ' 'We recommend installing PyOpenGL, but it could not '