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
@@ -44,6 +44,9 @@ class MaintenanceView(View):
self.entry['completion'].set_placeholder_text(context.get_datefmt_placeholder())
self.dt_completion = DatePicker(self.entry['completion'], self.button['completion'], context.get_datefmt())
# subscribe to data change events
self.context.subscribe("vessel_modified", self.vessel_modified)
def get_list_row(self):
return (
self.maint.maintid,
@@ -76,6 +79,11 @@ class MaintenanceView(View):
# restore previous selected row
selection.select_iter(treeiter)
def vessel_modified(self, eventtype, data):
self.tree['maintenance'].get_selection().unselect_all()
self.load_list()
self.topwidget.set_visible_child(self.box['maintenance'])
def clear_record(self):
self.maint.clear()
self.entry['activities'].set_text('')