This commit is contained in:
恍兮惚兮 2024-10-01 23:55:08 +08:00
parent 8377459621
commit cda0432d89
4 changed files with 16 additions and 10 deletions

View File

@ -589,12 +589,12 @@ class pixwrapper(QWidget):
deleteimage_x = LAction(("删除图片文件")) deleteimage_x = LAction(("删除图片文件"))
hualang = LAction(("画廊")) hualang = LAction(("画廊"))
pos = LAction(("位置")) pos = LAction(("位置"))
if curr and os.path.exists(curr):
menu.addAction(setimage) menu.addAction(setimage)
menu.addAction(seticon) menu.addAction(seticon)
menu.addAction(copyimage) menu.addAction(copyimage)
menu.addAction(deleteimage) menu.addAction(deleteimage)
menu.addAction(deleteimage_x) menu.addAction(deleteimage_x)
menu.addAction(hualang) menu.addAction(hualang)
if _1: if _1:
menu.addSeparator() menu.addSeparator()

View File

@ -1,5 +1,5 @@
from qtsymbols import * from qtsymbols import *
import os, platform, functools, uuid, json, math, csv, io import os, platform, functools, uuid, json, math, csv, io, pickle
from traceback import print_exc from traceback import print_exc
import windows, qtawesome, winsharedutils, gobject import windows, qtawesome, winsharedutils, gobject
from webviewpy import webview_native_handle_kind_t, Webview, declare_library_path from webviewpy import webview_native_handle_kind_t, Webview, declare_library_path
@ -1955,6 +1955,8 @@ class listediter(LDialog):
rows = self.hcmodel.rowCount() rows = self.hcmodel.rowCount()
rowoffset = 0 rowoffset = 0
dedump = set() dedump = set()
if self.closecallback:
before = pickle.dumps(self.lst)
self.lst.clear() self.lst.clear()
for row in range(rows): for row in range(rows):
if self.namemapfunction: if self.namemapfunction:
@ -1967,7 +1969,9 @@ class listediter(LDialog):
self.lst.append(k) self.lst.append(k)
dedump.add(k) dedump.add(k)
if self.closecallback: if self.closecallback:
self.closecallback() after = pickle.dumps(self.lst)
if before != after:
self.closecallback()
def __cb(self, paths): def __cb(self, paths):
if isinstance(paths, str): if isinstance(paths, str):

View File

@ -5,11 +5,13 @@ import gobject
import os, subprocess, functools import os, subprocess, functools
import time, winrtutils, winsharedutils, hashlib import time, winrtutils, winsharedutils, hashlib
from myutils.config import savehook_new_data, globalconfig from myutils.config import savehook_new_data, globalconfig
from myutils.wrapper import threader, tryprint from myutils.wrapper import threader
from myutils.utils import qimage2binary from myutils.utils import qimage2binary
def clipboard_set_image(p: QImage): def clipboard_set_image(p: QImage):
if not p:
return
if isinstance(p, str): if isinstance(p, str):
qimg = QImage() qimg = QImage()
qimg.load(p) qimg.load(p)

View File

@ -29,7 +29,7 @@ include(generate_product_version)
set(VERSION_MAJOR 5) set(VERSION_MAJOR 5)
set(VERSION_MINOR 41) set(VERSION_MINOR 41)
set(VERSION_PATCH 0) set(VERSION_PATCH 1)
add_library(pch pch.cpp) add_library(pch pch.cpp)
target_precompile_headers(pch PUBLIC pch.h) target_precompile_headers(pch PUBLIC pch.h)