removes tree selection after deleting a record

This commit is contained in:
2025-04-19 12:58:34 +02:00
parent 9c6669f349
commit 974fce8a26

View File

@@ -271,6 +271,7 @@ class Application:
self.table.delete(self.current_record) self.table.delete(self.current_record)
self.clear_entry_fields() self.clear_entry_fields()
self.deselect_tree()
self._save_json_file() self._save_json_file()
def update_record(self): def update_record(self):
@@ -309,6 +310,10 @@ class Application:
entry.set("") entry.set("")
self.current_record = None self.current_record = None
def deselect_tree(self):
while len(self.table.selection()) > 0:
self.table.selection_remove(self.table.selection()[0])
def mouse_click(self, event): def mouse_click(self, event):
region = self.table.identify("region", event.x, event.y) region = self.table.identify("region", event.x, event.y)
match region: match region: