Fixed vessel change code in native gui

This commit is contained in:
thooge committed 2026-11-12 19:34:59 +01:00
1 parent 09387280fc
commit db74fb6970
16 files changed
+192 -33

No files matched your search

+8
View File
@@ -40,6 +40,9 @@ class ProjectsView(View):
self.entry['date_start'].set_placeholder_text(context.get_datefmt_placeholder())
DatePicker(self.entry['date_start'], self.button['date_start'], context.get_datefmt())
# subscribe to data change events
self.context.subscribe("vessel_modified", self.vessel_modified)
def get_list_row(self):
return (
self.project.projid,
@@ -82,6 +85,11 @@ class ProjectsView(View):
# restore previous selected row
selection.select_iter(treeiter)
def vessel_modified(self, eventtype, data):
self.tree['projects'].get_selection().unselect_all()
self.load_list()
self.topwidget.set_visible_child(self.box['projects'])
def clear_record(self):
self.project.clear()
self.entry['name'].set_text('')