Clear comparison results and topology visualization on new file upload

This commit is contained in:
dmy
2026-01-08 10:10:46 +08:00
parent 397ca8847e
commit 886fba4d15

10
gui.py
View File

@@ -342,6 +342,16 @@ def index():
update_info_panel()
# 清空方案对比结果和拓扑可视化
state["results"] = []
if refs["results_table"]:
refs["results_table"].rows = []
refs["results_table"].selected = []
if refs["plot_container"]:
refs["plot_container"].clear()
if refs["export_row"]:
refs["export_row"].clear()
# 清空上传组件列表,以便下次选择(配合 .no-list CSS 使用)
if refs["upload_widget"]:
refs["upload_widget"].reset()