From 87d051fa716bb35fc59aa4ee1179cc4bc406834d Mon Sep 17 00:00:00 2001 From: evandrocoan Date: Sun, 31 May 2020 18:37:10 -0300 Subject: [PATCH] Set to browser.py finddupes.ui remember the last selected field https://anki.tenderapp.com/discussions/ankidesktop/39468-find-and-replace-does-not-remember-the-input-from-last-time --- qt/aqt/browser.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qt/aqt/browser.py b/qt/aqt/browser.py index 173f75c2f..49eb64f8a 100644 --- a/qt/aqt/browser.py +++ b/qt/aqt/browser.py @@ -2019,7 +2019,9 @@ update cards set usn=?, mod=?, did=? where id in """ anki.find.fieldNames(self.col, downcase=False), key=lambda x: x.lower() ) frm.fields.addItems(fields) + restoreComboIndex(frm.fields, fields, "findDupesFields") self._dupesButton = None + # links frm.webView.title = "find duplicates" web_context = FindDupesDialog(dialog=d, browser=self) @@ -2033,6 +2035,7 @@ update cards set usn=?, mod=?, did=? where id in """ def onClick(): search_text = saveComboHistory(frm.search, searchHistory, "findDupesFind") + saveComboIndex(frm.fields, "findDupesFields") field = fields[frm.fields.currentIndex()] self.duplicatesReport(frm.webView, field, search_text, frm, web_context)