Use escape to close the deck chooser without switching to the selected deck

This commit is contained in:
David Lönnhager 2018-11-26 18:06:29 +01:00
parent 39b77951c3
commit 5744ab01e4
2 changed files with 2 additions and 3 deletions

View file

@ -75,7 +75,8 @@ class DeckChooser(QHBoxLayout):
self.mw, current=current, accept=_("Choose"),
title=_("Choose Deck"), help="addingnotes",
cancel=False, parent=self.widget, geomKey="selectDeck")
self.setDeckName(ret.name)
if ret.name:
self.setDeckName(ret.name)
def setDeckName(self, name):
self.deck.setText(name.replace("&", "&&"))

View file

@ -114,8 +114,6 @@ class StudyDeck(QDialog):
def reject(self):
saveGeom(self, self.geomKey)
remHook('reset', self.onReset)
if not self.cancel:
return self.accept()
QDialog.reject(self)
def onAddDeck(self):