summaryrefslogtreecommitdiffstats
path: root/widget/src/checkbox.rs
diff options
context:
space:
mode:
Diffstat (limited to 'widget/src/checkbox.rs')
-rw-r--r--widget/src/checkbox.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/widget/src/checkbox.rs b/widget/src/checkbox.rs
index e5dea3cc..6c5d7d6b 100644
--- a/widget/src/checkbox.rs
+++ b/widget/src/checkbox.rs
@@ -345,13 +345,11 @@ where
if let Event::Window(window::Event::RedrawRequested(_now)) = event {
self.last_status = Some(current_status);
- } else {
- match self.last_status {
- Some(status) if status != current_status => {
- shell.request_redraw(window::RedrawRequest::NextFrame);
- }
- _ => {}
- }
+ } else if self
+ .last_status
+ .is_some_and(|status| status != current_status)
+ {
+ shell.request_redraw();
}
event::Status::Ignored