Skip to content

Commit

Permalink
Fix save customize lemmas error in calibre 6.26
Browse files Browse the repository at this point in the history
calibre 6.26 introduced a commit
kovidgoyal/calibre@6966986
which makes the previous code can't find the correct `gui` parent.
  • Loading branch information
xxyzz committed Sep 17, 2023
1 parent f041ef6 commit 817c193
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,9 @@ def open_choose_lemma_lang_dialog(self, is_kindle: bool = True) -> None:
QSqlDatabase.removeDatabase(custom_lemmas_dlg.db_connection_name)

def run_threaded_job(self, func, args, job_title):
gui = self.parent().parent()
gui = self.parent()
while gui.parent() is not None:
gui = gui.parent()
job = ThreadedJob(
"WordDumb's dumb job",
job_title,
Expand Down
2 changes: 1 addition & 1 deletion data/deps.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"lxml": "4.9.3",
"thinc-apple-ops": "0.1.3",
"torch": "2.0.1",
"rapidfuzz": "3.2.0",
"rapidfuzz": "3.3.0",
"spacy_cpu_model": "3.6.0",
"spacy_trf_model": "3.6.1"
}

0 comments on commit 817c193

Please sign in to comment.