This commit is contained in:
恍兮惚兮 2024-10-12 17:43:56 +08:00
parent d87332c126
commit 79b10ca92a
3 changed files with 6 additions and 3 deletions

View File

@ -368,7 +368,7 @@ class MAINUI:
self.transhis.getnewsentencesignal.emit(text) self.transhis.getnewsentencesignal.emit(text)
self.maybesetedittext(text) self.maybesetedittext(text)
if not globalconfig["showfanyi"]: if not waitforresultcallback and not globalconfig["showfanyi"]:
return _showrawfunction() return _showrawfunction()
text_solved, optimization_params = self.solvebeforetrans(text) text_solved, optimization_params = self.solvebeforetrans(text)

View File

@ -82,7 +82,7 @@ class triggereditor(LDialog):
table.setSelectionMode((QAbstractItemView.SelectionMode.SingleSelection)) table.setSelectionMode((QAbstractItemView.SelectionMode.SingleSelection))
table.setWordWrap(False) table.setWordWrap(False)
table.setModel(model) table.setModel(model)
table.getindexdata = self.__getindexwidgetdata
table.setContextMenuPolicy(Qt.ContextMenuPolicy.CustomContextMenu) table.setContextMenuPolicy(Qt.ContextMenuPolicy.CustomContextMenu)
table.customContextMenuRequested.connect(self.showmenu) table.customContextMenuRequested.connect(self.showmenu)
self.hctable = table self.hctable = table
@ -109,6 +109,9 @@ class triggereditor(LDialog):
self.resize(600, self.sizeHint().height()) self.resize(600, self.sizeHint().height())
self.show() self.show()
def __getindexwidgetdata(self, index: QModelIndex):
return self.hctable.indexWidgetX(index).currentIndex()
def closeEvent(self, a0: QCloseEvent) -> None: def closeEvent(self, a0: QCloseEvent) -> None:
rows = self.hcmodel.rowCount() rows = self.hcmodel.rowCount()
self.list.clear() self.list.clear()

View File

@ -29,7 +29,7 @@ include(generate_product_version)
set(VERSION_MAJOR 5) set(VERSION_MAJOR 5)
set(VERSION_MINOR 42) set(VERSION_MINOR 42)
set(VERSION_PATCH 11) set(VERSION_PATCH 12)
add_library(pch pch.cpp) add_library(pch pch.cpp)
target_precompile_headers(pch PUBLIC pch.h) target_precompile_headers(pch PUBLIC pch.h)