🎨 避免关闭卡顿

This commit is contained in:
BTMuli
2023-10-27 15:25:42 +08:00
parent e1e4f805ea
commit d4295c7dc9

View File

@@ -96,8 +96,10 @@ fn main() {
// 子窗口 label 的数组
const SUB_WINDOW_LABELS: [&str; 3] = ["Sub_window", "Dev_JSON", "mhy_client"];
for label in SUB_WINDOW_LABELS.iter() {
let sub = window.get_window(label).unwrap();
sub.close().unwrap();
let sub = window.get_window(label);
if sub.is_some() {
sub.unwrap().close().unwrap();
}
}
}
window.close().unwrap();