Skip to content

Fix/custom func save and preview - #213

Closed
chen-ying-he wants to merge 3 commits into
nachifur:masterfrom
chen-ying-he:fix/custom-func-save-and-preview
Closed

Fix/custom func save and preview#213
chen-ying-he wants to merge 3 commits into
nachifur:masterfrom
chen-ying-he:fix/custom-func-save-and-preview

Conversation

@chen-ying-he

Copy link
Copy Markdown

No description provided.

@chen-ying-he
chen-ying-he force-pushed the fix/custom-func-save-and-preview branch 3 times, most recently from 8ff3989 to b9a6d16 Compare May 24, 2026 16:06
aaa3563 added 3 commits May 25, 2026 14:03
问题:CustomFunc 下拉框添加或删除算法后,界面列表和 Python 模块缓存可能不同步;同时选中算法后的处理结果、拼接图、放大镜图和选中图片保存目录不统一,容易写到错误位置。

修改:删除不应该存在的 Oil Painting Effect,添加算法时校验路径、main.py 和重复名称,添加或删除后清理模块缓存并刷新下拉框;同时把选中算法相关输出统一保存到 processing_function/<算法名>/ 下。

范围:只影响 CustomFunc 下拉框、添加/删除算法、算法列表刷新,以及选中 CustomFunc 算法后的保存路径。
问题:之前只在勾选 Show 时检查保存路径,ShowAllFunc 或内部自定义处理状态触发 Refresh 时不会弹出保存路径选择框,导致自定义处理输出没有明确保存位置。

修改:把保存路径检查统一成预览前判断;只要图片模式下当前预览会触发 CustomFunc 或 ShowAllFunc 这类自定义处理输出,并且保存路径为空,就先弹出保存路径选择框,并同步到 ImgManager.layout_params[33]。

范围:只影响图片模式下处理预览前的输出路径检查;视频模式不走这个弹框,避免影响视频缓存和播放逻辑。
问题:之前为了缓解图片多时翻页卡顿,在图片模式里进一步使用图片页内存缓存,担心和视频模式或其他模式的缓存状态互相影响。

修改:图片模式翻页改回更接近老版本的当前页直接拼接显示流程,不从 image_cache_img 读取当前页,也不把当前页写入 image_cache_img;只在输入、Refresh 或布局变化时重置图片显示状态。

优化:保留非缓存型优化,只有显示图片尺寸变化时才执行 auto_layout,减少翻页时重复布局造成的卡顿。

范围:只影响图片模式翻页显示路径;视频模式继续使用原来的 cache_img,不改视频缓存逻辑。
@chen-ying-he
chen-ying-he force-pushed the fix/custom-func-save-and-preview branch from b9a6d16 to 0b4360d Compare May 25, 2026 06:04
@nachifur nachifur closed this Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants