From 1bb078216ed3eb10d20883ae18a214b0d21bb928 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=B5=E5=AD=90=E5=A4=AB?= <98402800+slhs1121505@users.noreply.github.com> Date: Sun, 5 Oct 2025 23:08:18 +0800 Subject: [PATCH 1/2] Update main.py --- main.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 3092cb7..5d53304 100644 --- a/main.py +++ b/main.py @@ -409,9 +409,14 @@ def select_folder(): MaxMemory_Display = tk.StringVar() def update_memory_display(*args): - MinMemory_Display.set(f"{MinMemory_var.get()} MB") - MaxMemory_Display.set(f"{MaxMemory_var.get()} MB") - + min_val = MinMemory_var.get() + max_val = MaxMemory_var.get() + # 確保最小 <= 最大 + if min_val > max_val: + MaxMemory_var.set(min_val) + max_val = min_val + MinMemory_Display.set(f"{min_val} MB") + MaxMemory_Display.set(f"{max_val} MB") MinMemory_var.trace_add("write", update_memory_display) MaxMemory_var.trace_add("write", update_memory_display) update_memory_display() @@ -600,3 +605,4 @@ def on_java_download_finished(java_path): win, CreateServerButton, status_var = CreateGUI() CreateServerButton.configure(command=on_create_server) win.mainloop() + From 4cb593faf3665bd9eda5e1a095b9596d2a26fe1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=B5=E5=AD=90=E5=A4=AB?= <98402800+slhs1121505@users.noreply.github.com> Date: Sun, 5 Oct 2025 23:09:20 +0800 Subject: [PATCH 2/2] Update main.py --- main.py | 1 - 1 file changed, 1 deletion(-) diff --git a/main.py b/main.py index 5d53304..704f509 100644 --- a/main.py +++ b/main.py @@ -605,4 +605,3 @@ def on_java_download_finished(java_path): win, CreateServerButton, status_var = CreateGUI() CreateServerButton.configure(command=on_create_server) win.mainloop() -