diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py
index e448c6509..ad8195ed3 100644
--- a/ankiqt/ui/main.py
+++ b/ankiqt/ui/main.py
@@ -1670,16 +1670,17 @@ Error was:\n%(f1)s\n...\n%(f2)s""") % {'f1': fmt1, 'f2': fmt2})
def onCheckDB(self):
"True if no problems"
+ if not ui.utils.askUser(_("""\
+This operation will find and fix some common problems.
+
+On the next sync, all cards will be sent to the server.
+Any changes on the server since your last sync will be lost.
+
+This operation is not undoable.
+Proceed?""")):
+ return
ret = self.deck.fixIntegrity()
if ret == "ok":
- ret = _("""\
-No problems found. Some data structures have been rebuilt in case
-they were causing problems.
-On the next sync, all cards will be sent to the server.
-If you have changes on the server and have not synced locally,
-do not sync your deck. Restore your deck from an automatic
-backup and then run this command again after syncing.""")
- ui.utils.showInfo(ret)
ret = True
else:
ret = _("Problems found:\n%s") % ret
@@ -1717,12 +1718,13 @@ the same field count and card count.""") % ret[1])
mb.setIcon(QMessageBox.Warning)
mb.setText(_("""\
This operation:
- - deletes files not referenced by cards
+ - deletes files not referenced by cards
- either tags cards, or deletes references to missing files
- renames files to a string of numbers and letters
- updates checksums for files which have been changed
-If in doubt, backup your media directory first."""))
+This operation is not undoable.
+Consider backing up your media directory first."""))
bTag = QPushButton("Tag Cards")
mb.addButton(bTag, QMessageBox.RejectRole)
bDelete = QPushButton("Delete Refs")