Merge pull request #264 from dlon/close-deck-chooser

Close deck chooser without changing the deck
This commit is contained in:
Damien Elmes 2018-11-27 07:55:50 +10:00 committed by GitHub
commit a8e7c0c31b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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):