From 886fba4d15e282e304168b66d57fdcebafffed7f Mon Sep 17 00:00:00 2001 From: dmy Date: Thu, 8 Jan 2026 10:10:46 +0800 Subject: [PATCH] Clear comparison results and topology visualization on new file upload --- gui.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gui.py b/gui.py index 6e641ce..918034c 100644 --- a/gui.py +++ b/gui.py @@ -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()