support homonymy inside modal

This commit is contained in:
matic_t
2020-07-16 03:22:54 -07:00
parent fb9a809c02
commit b010414bfe
7 changed files with 36 additions and 31 deletions
+8 -8
View File
@@ -9,34 +9,34 @@ class Update:
# check if completely no action needed
if msg.no_action():
return
# by default, no need to redraw entry
entry_redraw = False
# check if we need to signal the data change
if msg.data_change():
screenful.changed()
entry_redraw = True
# redraw of view can happen even if no data changed
entry_redraw |= msg.entry_redraw()
# check if we need to reset the model
reset = msg.reset()
if reset:
self.model.pre_reset()
# actually run the update_model
msg.update_model(self.model)
msg.clear_args()
# post reset comes now
if reset:
self.model.post_reset()
self.view.view(self.model, entry_redraw)
def set_model(self, model):
self.model = model