修复所有 Panel 的相对路径传递问题,防止 FileNotFoundError
This commit is contained in:
@ -179,6 +179,9 @@ class Step2Panel(QWidget):
|
||||
|
||||
# 填充获取到的路径
|
||||
if mask_path:
|
||||
# 若为相对路径,使用 work_dir 合成为绝对路径
|
||||
if not os.path.isabs(mask_path):
|
||||
mask_path = os.path.join(self.work_dir or '', mask_path).replace('\\', '/')
|
||||
self.water_mask_file.set_path(mask_path)
|
||||
|
||||
# 3. 自动填充输出路径(基于工作目录)
|
||||
|
||||
Reference in New Issue
Block a user