fix(gui): step8 QBrush崩溃修复 + step9 自动探测 Traditional_Indices 目录回填
This commit is contained in:
@ -315,6 +315,25 @@ class Step9Panel(QWidget):
|
||||
if not existing or not existing.strip():
|
||||
self.csv_file.set_path(step5_output_path)
|
||||
|
||||
# 1.5 自动探测并回填 Step 8 双轨输出的 Traditional_Indices 目录
|
||||
if self.work_dir:
|
||||
trad_indices_dir = os.path.join(
|
||||
self.work_dir, "11_12_13_predictions", "Traditional_Indices"
|
||||
)
|
||||
if os.path.isdir(trad_indices_dir):
|
||||
csv_files = [
|
||||
f for f in os.listdir(trad_indices_dir)
|
||||
if f.lower().endswith('.csv')
|
||||
]
|
||||
if csv_files:
|
||||
csv_files.sort()
|
||||
first_csv = os.path.join(trad_indices_dir, csv_files[0])
|
||||
existing = self.csv_file.get_path()
|
||||
if not existing or not existing.strip():
|
||||
self.csv_file.set_path(first_csv)
|
||||
self.refresh_csv_columns()
|
||||
print(f"✅ 自动探测到 Traditional_Indices 目录,加载首个CSV: {csv_files[0]}")
|
||||
|
||||
# 2. 自动填充输出目录(9_Custom_Regression_Modeling)
|
||||
if self.work_dir:
|
||||
output_dir = os.path.join(self.work_dir, "9_Custom_Regression_Modeling")
|
||||
|
||||
Reference in New Issue
Block a user