diff --git a/ankiqt/ui/deckproperties.py b/ankiqt/ui/deckproperties.py index 11bf2de71..53c69004d 100644 --- a/ankiqt/ui/deckproperties.py +++ b/ankiqt/ui/deckproperties.py @@ -25,6 +25,9 @@ class DeckProperties(QDialog): self.d = deck self.onFinish = onFinish self.origMod = self.d.modified + if not self.d.path: + ui.utils.showInfo(_("Please save the deck first.")) + return self.dialog = ankiqt.forms.deckproperties.Ui_DeckProperties() self.dialog.setupUi(self) self.dialog.buttonBox.button(QDialogButtonBox.Help).setAutoDefault(False) diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py index 47c6dc52b..a1b2fda1b 100755 --- a/ankiqt/ui/main.py +++ b/ankiqt/ui/main.py @@ -2152,6 +2152,9 @@ it to your friends. return if self.deck and not self.deck.syncName: if interactive: + if not self.deck.path: + ui.utils.showInfo(_("Please save the deck first.")) + return # enable syncing self.deck.enableSyncing() else: