diff options
| author | Daniel Thompson <daniel@redfelineninja.org.uk> | 2020-11-29 08:58:37 (GMT) |
|---|---|---|
| committer | Daniel Thompson <daniel@redfelineninja.org.uk> | 2020-11-29 09:12:14 (GMT) |
| commit | 167173e9bac0776ebf91759d27a0333f90a7893b (patch) | |
| tree | 66543abe0ec5916777fe3d04d1f536739b0f692e | |
| parent | 40ac92094e1e930063aa04380a6502214fedc8ce (diff) | |
widgets: ConfirmationView: Allow the widget to manage its own visibility
When the buttons are pressed then the widget should be dismissed. There
is no reason to make the caller handle that.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
| -rw-r--r-- | wasp/widgets.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/wasp/widgets.py b/wasp/widgets.py index 39d8b19..d5abd16 100644 --- a/wasp/widgets.py +++ b/wasp/widgets.py @@ -354,8 +354,10 @@ class ConfirmationView: ) if is_yes_button_press: + self.active = False return True elif is_no_button_press: + self.active = False return False else: return None |
