Skip to content

Commit

Permalink
Merge pull request #36 from minvws/feature/no-back-after-keyselect
Browse files Browse the repository at this point in the history
Prevent backscrolls by using `setCommitPage`
  • Loading branch information
basvandriel authored Dec 5, 2024
2 parents 80c309f + 449ff8f commit 05d99ae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/page/selectkey.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@


class SelectYubiKeyPage(QWizardPage):
def _prevent_backbutton_clicks(self):
self.setCommitPage(True)

def __init__(self, mypkcs, parent=None):
super().__init__(parent)
self.setTitle("Selecteer de te gebruiken yubikey")
Expand Down Expand Up @@ -38,8 +41,9 @@ def __init__(self, mypkcs, parent=None):
self.yubikeyListWidget.setItemWidget(item, itemWidget)
item.setSizeHint(itemWidget.sizeHint())

layout.addWidget(self.yubikeyListWidget)
self._prevent_backbutton_clicks()

layout.addWidget(self.yubikeyListWidget)
self.yubikeyListWidget.currentItemChanged.connect(self.enableNextButton)

def yubiKeySelected(self, current, _previous):
Expand Down

0 comments on commit 05d99ae

Please sign in to comment.