summaryrefslogtreecommitdiff
path: root/wasp/widgets.py
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-11-29 08:58:37 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2020-11-29 09:12:14 (GMT)
commit167173e9bac0776ebf91759d27a0333f90a7893b (patch)
tree66543abe0ec5916777fe3d04d1f536739b0f692e /wasp/widgets.py
parent40ac92094e1e930063aa04380a6502214fedc8ce (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>
Diffstat (limited to 'wasp/widgets.py')
-rw-r--r--wasp/widgets.py2
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