diff --git a/ankiqt/ui/activetags.py b/ankiqt/ui/activetags.py index 9dd6d227f..7bfcc6a7a 100644 --- a/ankiqt/ui/activetags.py +++ b/ankiqt/ui/activetags.py @@ -55,7 +55,6 @@ class ActiveTagsChooser(QDialog): QDesktopServices.openUrl(QUrl(ankiqt.appWiki + "ActiveTags")) - def show(parent): at = ActiveTagsChooser(parent) at.exec_() diff --git a/ankiqt/ui/deckproperties.py b/ankiqt/ui/deckproperties.py index e557f0ed1..c4a01a04f 100644 --- a/ankiqt/ui/deckproperties.py +++ b/ankiqt/ui/deckproperties.py @@ -203,6 +203,8 @@ class DeckProperties(QDialog): self.sourcesToRemove.append(id) def reject(self): + n = _("Deck Properties") + self.parent.deck.setUndoStart(n) # description self.updateField(self.d, 'description', unicode(self.dialog.deckDescription.toPlainText())) @@ -301,4 +303,5 @@ insert into sources values # mark deck dirty and close if self.origMod != self.d.modified: self.parent.reset() + self.parent.deck.setUndoEnd(n) QDialog.reject(self) diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py index b885d543e..f09e1f6c0 100644 --- a/ankiqt/ui/main.py +++ b/ankiqt/ui/main.py @@ -966,6 +966,8 @@ To upgrade an old deck, download Anki 0.9.8.7.""")) self.deck.setModified() def onSuspend(self): + undo = _("Suspend") + self.deck.setUndoStart(undo) self.currentCard.fact.tags = addTags("Suspended", self.currentCard.fact.tags) self.currentCard.fact.setModified() for card in self.currentCard.fact.cards: @@ -973,6 +975,7 @@ To upgrade an old deck, download Anki 0.9.8.7.""")) self.deck.setModified() self.lastScheduledTime = None self.reset() + self.deck.setUndoEnd(undo) def onUndo(self): self.deck.undo() diff --git a/ankiqt/ui/modelproperties.py b/ankiqt/ui/modelproperties.py index 7ece5d13f..88c820c36 100644 --- a/ankiqt/ui/modelproperties.py +++ b/ankiqt/ui/modelproperties.py @@ -32,6 +32,8 @@ class ModelProperties(QDialog): self.setupCards() self.readData() self.show() + self.undoName = _("Model Properties") + self.parent.deck.setUndoStart(self.undoName) def readData(self): # properties section @@ -488,4 +490,5 @@ class ModelProperties(QDialog): self.parent.reset() if self.onFinish: self.onFinish() + self.parent.deck.setUndoEnd(self.undoName) QDialog.reject(self)