versione prima di artos
This commit is contained in:
parent
01936497a0
commit
3f8849f0fb
@ -318,21 +318,15 @@ class MonitorApp(tk.Frame):
|
|||||||
# Use the form container for showing message details; do not toggle the
|
# Use the form container for showing message details; do not toggle the
|
||||||
# tree visibility here. The DetailsPane places the form inside a
|
# tree visibility here. The DetailsPane places the form inside a
|
||||||
# scrollable canvas so it remains visible while updating.
|
# scrollable canvas so it remains visible while updating.
|
||||||
# if same form is already shown, just refresh widget values
|
# if same form is already shown, refresh widget values safely
|
||||||
if getattr(self, 'current_form_label', None) == label and self.form_widgets:
|
if getattr(self, 'current_form_label', None) == label and self.form_widgets:
|
||||||
try:
|
try:
|
||||||
self._update_form_values(msg_wrapper)
|
# use the existing helper which fetches fresh wrapper and
|
||||||
|
# updates widgets without rebuilding the form
|
||||||
|
self._refresh_and_update_form()
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
return
|
return
|
||||||
# clear previous form
|
|
||||||
for w in self.detail_form_container.winfo_children():
|
|
||||||
try:
|
|
||||||
w.destroy()
|
|
||||||
except Exception:
|
|
||||||
pass
|
|
||||||
self.form_widgets = {}
|
|
||||||
self.current_form_label = label
|
|
||||||
|
|
||||||
mdb = self._get_message_db()
|
mdb = self._get_message_db()
|
||||||
if mdb is None:
|
if mdb is None:
|
||||||
@ -348,6 +342,15 @@ class MonitorApp(tk.Frame):
|
|||||||
if msg is None:
|
if msg is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# clear previous form only when we know we're going to build a new one
|
||||||
|
for w in self.detail_form_container.winfo_children():
|
||||||
|
try:
|
||||||
|
w.destroy()
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
self.form_widgets = {}
|
||||||
|
self.current_form_label = label
|
||||||
|
|
||||||
# header with Apply button at top
|
# header with Apply button at top
|
||||||
hdr = tk.Frame(self.detail_form_container)
|
hdr = tk.Frame(self.detail_form_container)
|
||||||
hdr.pack(fill=tk.X, padx=6, pady=(6,0))
|
hdr.pack(fill=tk.X, padx=6, pady=(6,0))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user