格式统一
This commit is contained in:
@ -503,8 +503,21 @@ class WaterQualityGUI(QMainWindow):
|
||||
|
||||
try:
|
||||
# 1. 触发懒加载生成面板
|
||||
self._panel_factory.get_panel(item_data)
|
||||
|
||||
panel = self._panel_factory.get_panel(item_data)
|
||||
|
||||
# ★ 2026-07-01:每次切页时刷新面板的自动路由
|
||||
# 面板首次加载时 _replay_state_to_panel 会调 update_from_config,
|
||||
# 但再次切回时 get_panel() 直接返回已有实例,不会重扫文件系统。
|
||||
# 此处显式调用确保 Step11 等面板始终基于最新磁盘状态做文件夹自动导入。
|
||||
if panel is not None and hasattr(panel, 'update_from_config'):
|
||||
try:
|
||||
panel.update_from_config(
|
||||
work_dir=self._workspace_initializer.work_dir,
|
||||
pipeline=None,
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# 🚨 核心防卡死补丁:如果目标 Tab 被后台任务异常永久锁定,强制撬开!
|
||||
if not self._tab_widget.isTabEnabled(tab_index):
|
||||
self._log_manager.info(f"检测到 {item_data} 处于异常锁定状态,已执行强制解锁。")
|
||||
|
||||
Reference in New Issue
Block a user