mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
Use escape to close the deck chooser without switching to the selected deck
This commit is contained in:
parent
39b77951c3
commit
5744ab01e4
2 changed files with 2 additions and 3 deletions
|
@ -75,7 +75,8 @@ class DeckChooser(QHBoxLayout):
|
||||||
self.mw, current=current, accept=_("Choose"),
|
self.mw, current=current, accept=_("Choose"),
|
||||||
title=_("Choose Deck"), help="addingnotes",
|
title=_("Choose Deck"), help="addingnotes",
|
||||||
cancel=False, parent=self.widget, geomKey="selectDeck")
|
cancel=False, parent=self.widget, geomKey="selectDeck")
|
||||||
self.setDeckName(ret.name)
|
if ret.name:
|
||||||
|
self.setDeckName(ret.name)
|
||||||
|
|
||||||
def setDeckName(self, name):
|
def setDeckName(self, name):
|
||||||
self.deck.setText(name.replace("&", "&&"))
|
self.deck.setText(name.replace("&", "&&"))
|
||||||
|
|
|
@ -114,8 +114,6 @@ class StudyDeck(QDialog):
|
||||||
def reject(self):
|
def reject(self):
|
||||||
saveGeom(self, self.geomKey)
|
saveGeom(self, self.geomKey)
|
||||||
remHook('reset', self.onReset)
|
remHook('reset', self.onReset)
|
||||||
if not self.cancel:
|
|
||||||
return self.accept()
|
|
||||||
QDialog.reject(self)
|
QDialog.reject(self)
|
||||||
|
|
||||||
def onAddDeck(self):
|
def onAddDeck(self):
|
||||||
|
|
Loading…
Reference in a new issue