Fixed vessel change code in native gui
This commit is contained in:
1 parent
09387280fc
commit
db74fb6970
16 files changed
+192
-33
No files matched your search
@@ -55,9 +55,11 @@ class MeasurementView(View):
|
||||
self.entry['date'].set_placeholder_text(context.get_datefmt_placeholder())
|
||||
DatePicker(self.entry['date'], self.button['date'], context.get_datefmt())
|
||||
|
||||
# subscribe to data change events
|
||||
self.context.subscribe("dd_mcat_modified", self.category_modified)
|
||||
self.context.subscribe("dd_unit_modified", self.unit_modified)
|
||||
self.context.subscribe("equipment_modified", self.equipment_modified)
|
||||
self.context.subscribe("vessel_modified", self.vessel_modified)
|
||||
|
||||
def get_list_row(self):
|
||||
unit = self.dd_unit[self.measure.unit]
|
||||
@@ -165,6 +167,11 @@ class MeasurementView(View):
|
||||
# not implemented
|
||||
pass
|
||||
|
||||
def vessel_modified(self, eventtype, data):
|
||||
self.tree['measurement'].get_selection().unselect_all()
|
||||
self.load_list()
|
||||
self.topwidget.set_visible_child(self.box['measurement'])
|
||||
|
||||
def clear_record(self):
|
||||
self.measure.clear()
|
||||
self.entry['name'].set_text('')
|
||||
|
||||
Reference in new issue
Block a user