You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is just a reminder that there seem to be some problems in some cases where PyQt5.QtCore.Qt.ShiftModifier (enum with integer value 33554432) does not match the key number emitted by holding shift.
A quick hack is to modify the code, but curious how this happens..
Use the above logging to find out what holding shift emits as modifier value and hardcode it below to make holding shift in the GUI work again..
diff --git a/obspyck/obspyck.py b/obspyck/obspyck.py
index 42cf70a..040ac5a 100755
--- a/obspyck/obspyck.py+++ b/obspyck/obspyck.py@@ -1827,6 +1827,7 @@ class ObsPyck(QtWidgets.QMainWindow):
(bottom, top) = ax.get_ybound()
# Get the keyboard modifiers. They are a enum type.
# Use bitwise or to compare...hope this is correct.
+ self.critical("%d" % ev.modifiers())
if ev.modifiers() == QtCore.Qt.NoModifier:
# Zoom in.
if ev.angleDelta().y() < 0:
@@ -1843,8 +1844,7 @@ class ObsPyck(QtWidgets.QMainWindow):
top += (mpl_ev.ydata - top) / 2
bottom -= (bottom - mpl_ev.ydata) / 2
# Still able to use the dictionary.
- elif ev.modifiers() == getattr(QtCore.Qt,- '%sModifier' % self.keys['switchWheelZoomAxis'].capitalize()):+ elif int(ev.modifiers()) == 33554432:
if self.widgets.qToolButton_spectrogram.isChecked():
# Zoom in on wheel-up
if ev.angleDelta().y() < 0:
The text was updated successfully, but these errors were encountered:
This is just a reminder that there seem to be some problems in some cases where
PyQt5.QtCore.Qt.ShiftModifier
(enum with integer value 33554432) does not match the key number emitted by holding shift.A quick hack is to modify the code, but curious how this happens..
Use the above logging to find out what holding shift emits as modifier value and hardcode it below to make holding shift in the GUI work again..
The text was updated successfully, but these errors were encountered: