Fix/custom func save and preview - #213
Closed
chen-ying-he wants to merge 3 commits into
Closed
Conversation
chen-ying-he
force-pushed
the
fix/custom-func-save-and-preview
branch
3 times, most recently
from
May 24, 2026 16:06
8ff3989 to
b9a6d16
Compare
问题: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
force-pushed
the
fix/custom-func-save-and-preview
branch
from
May 25, 2026 06:04
b9a6d16 to
0b4360d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.