diff --git a/ankiqt/ui/addcards.py b/ankiqt/ui/addcards.py index 6669dd26e..53f94549a 100644 --- a/ankiqt/ui/addcards.py +++ b/ankiqt/ui/addcards.py @@ -55,7 +55,7 @@ class AddCards(QDialog): QDesktopServices.openUrl(QUrl(ankiqt.appWiki + "AddItems")) def addButtons(self): - self.addButton = FocusButton(_("Add")) + self.addButton = QPushButton(_("Add")) self.dialog.buttonBox.addButton(self.addButton, QDialogButtonBox.ActionRole) self.addButton.setShortcut(_("Ctrl+Return")) @@ -66,7 +66,6 @@ class AddCards(QDialog): s = QShortcut(QKeySequence(_("Ctrl+Enter")), self) s.connect(s, SIGNAL("activated()"), self.addButton, SLOT("click()")) self.connect(self.addButton, SIGNAL("clicked()"), self.addCards) - self.connect(self.addButton, SIGNAL("tabIn"), self.maybeAddCards) self.closeButton = QPushButton(_("Close")) self.closeButton.setAutoDefault(False) self.dialog.buttonBox.addButton(self.closeButton, @@ -104,16 +103,6 @@ class AddCards(QDialog): self.editor.setFact(fact, check=True) self.setTabOrder(self.editor.tags, self.addButton) - def maybeAddCards(self): - self.editor.saveFieldsNow() - fact = self.editor.fact - try: - fact.assertValid() - fact.assertUnique(self.parent.deck.s) - except FactInvalidError: - return - self.addCards() - def addCards(self): # make sure updated self.editor.saveFieldsNow()