This commit is contained in:
恍兮惚兮 2024-11-28 00:29:35 +08:00
parent 2656d8c664
commit 5a44d43219
4 changed files with 9 additions and 7 deletions

View File

@ -1,7 +1,7 @@
set(VERSION_MAJOR 6)
set(VERSION_MINOR 6)
set(VERSION_PATCH 8)
set(VERSION_PATCH 9)
set(VERSION_REVISION 0)
set(LUNA_VERSION "{${VERSION_MAJOR},${VERSION_MINOR},${VERSION_PATCH},${VERSION_REVISION}}")
add_library(VERSION_DEF ${CMAKE_CURRENT_LIST_DIR}/version_def.cpp)

View File

@ -612,7 +612,7 @@ class pixwrapper(QWidget):
("画廊"),
("画廊"),
savehook_new_data[self.k]["imagepath_all"],
closecallback=lambda: self.setpix(self.k),
closecallback=lambda changed: self.setpix(self.k) if changed else None,
ispathsedit=dict(filter1=getimagefilefilter()),
)
elif action == setimage:

View File

@ -485,7 +485,9 @@ class AnkiWindow(QWidget):
"DeckName_i",
)
def refreshcombo(combo: QComboBox):
def refreshcombo(combo: QComboBox, changed):
if not changed:
return
combo.clear()
if len(globalconfig["ankiconnect"]["DeckNameS"]) == 0:
globalconfig["ankiconnect"]["DeckNameS"].append("lunadeck")

View File

@ -2091,8 +2091,7 @@ class listediter(LDialog):
dedump.add(k)
if self.closecallback:
after = pickle.dumps(self.lst)
if before != after:
self.closecallback()
self.closecallback(before != after)
def __cb(self, paths):
if isinstance(paths, str):
@ -2192,8 +2191,9 @@ class listediterline(QWidget):
self.edit.setReadOnly(True)
self.edit.clicked.connect(callback)
def callback(self):
self.setText("|".join(self.reflist))
def callback(self, changed):
if changed:
self.setText("|".join(self.reflist))
if self.directedit:
self.edit.setReadOnly(False)