diff --git a/LunaTranslator/LunaTranslator/LunaTranslator.py b/LunaTranslator/LunaTranslator/LunaTranslator.py index 296f9235..3f122e4e 100644 --- a/LunaTranslator/LunaTranslator/LunaTranslator.py +++ b/LunaTranslator/LunaTranslator/LunaTranslator.py @@ -368,7 +368,7 @@ class MAINUI: self.transhis.getnewsentencesignal.emit(text) self.maybesetedittext(text) - if not globalconfig["showfanyi"]: + if not waitforresultcallback and not globalconfig["showfanyi"]: return _showrawfunction() text_solved, optimization_params = self.solvebeforetrans(text) diff --git a/LunaTranslator/LunaTranslator/gui/setting_textinput_ocr.py b/LunaTranslator/LunaTranslator/gui/setting_textinput_ocr.py index ef588982..2a8b1d1a 100644 --- a/LunaTranslator/LunaTranslator/gui/setting_textinput_ocr.py +++ b/LunaTranslator/LunaTranslator/gui/setting_textinput_ocr.py @@ -82,7 +82,7 @@ class triggereditor(LDialog): table.setSelectionMode((QAbstractItemView.SelectionMode.SingleSelection)) table.setWordWrap(False) table.setModel(model) - + table.getindexdata = self.__getindexwidgetdata table.setContextMenuPolicy(Qt.ContextMenuPolicy.CustomContextMenu) table.customContextMenuRequested.connect(self.showmenu) self.hctable = table @@ -109,6 +109,9 @@ class triggereditor(LDialog): self.resize(600, self.sizeHint().height()) self.show() + def __getindexwidgetdata(self, index: QModelIndex): + return self.hctable.indexWidgetX(index).currentIndex() + def closeEvent(self, a0: QCloseEvent) -> None: rows = self.hcmodel.rowCount() self.list.clear() diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 612759c8..09670bbe 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -29,7 +29,7 @@ include(generate_product_version) set(VERSION_MAJOR 5) set(VERSION_MINOR 42) -set(VERSION_PATCH 11) +set(VERSION_PATCH 12) add_library(pch pch.cpp) target_precompile_headers(pch PUBLIC pch.h)