mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
make sure deck has a path before setting syncName
This commit is contained in:
parent
43e5f08805
commit
8b10b031db
2 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue