Skip to content

Commit

Permalink
Fixed issue where users could use the Escape key to bypass the NoSEAL…
Browse files Browse the repository at this point in the history
…KitPopup
  • Loading branch information
Ahsoka committed Jul 15, 2021
1 parent 911ad37 commit 38e9099
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion beskar/popups.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .utils import BaseInteractable, apply_voltage, get_number_of_devices, get_file
from PyQt6 import QtCore, QtWidgets, QtTest
from PyQt6 import QtCore, QtWidgets, QtTest, QtGui
from nidaqmx.system import System
from .constants import offset

Expand Down Expand Up @@ -108,6 +108,10 @@ def on_refresh_push_button_clicked(self):
else:
raise RuntimeError('This should never be triggered.')

def keyPressEvent(self, key_event: QtGui.QKeyEvent) -> None:
if key_event.key() != QtCore.Qt.Key.Key_Escape:
super().keyPressEvent(key_event)

@QtCore.pyqtSlot()
def on_mocked_mode_button_clicked(self):
self.main_window.mocked = True
Expand Down

0 comments on commit 38e9099

Please sign in to comment.