This commit is contained in:
恍兮惚兮 2024-12-14 12:35:13 +08:00
parent 67d9da7f2a
commit 4ce014fdc5

View File

@ -96,6 +96,7 @@ class AnkiWindow(QWidget):
def crophide(self, s=False): def crophide(self, s=False):
if s: if s:
self.parent().parent().parent().hide() self.parent().parent().parent().hide()
gobject.baseobject.translation_ui.hide_()
def ocroncefunction(rect): def ocroncefunction(rect):
img = imageCut(0, rect[0][0], rect[0][1], rect[1][0], rect[1][1]) img = imageCut(0, rect[0][0], rect[0][1], rect[1][0], rect[1][1])
@ -105,6 +106,7 @@ class AnkiWindow(QWidget):
if globalconfig["ankiconnect"]["ocrcroped"]: if globalconfig["ankiconnect"]["ocrcroped"]:
self.asyncocr(img) self.asyncocr(img)
if s: if s:
gobject.baseobject.translation_ui.show_()
self.parent().parent().parent().show() self.parent().parent().parent().show()
rangeselct_function(ocroncefunction, False) rangeselct_function(ocroncefunction, False)