修复所有 Panel 的相对路径传递问题,防止 FileNotFoundError
This commit is contained in:
@ -294,6 +294,9 @@ class Step3Panel(QWidget):
|
||||
mask_path = main_window.step1_panel.mask_file.get_path()
|
||||
|
||||
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)
|
||||
|
||||
# 自动填充输出路径(基于工作目录)
|
||||
|
||||
Reference in New Issue
Block a user