diff --git a/src/frontpanel.rs b/src/frontpanel.rs index 94d297d..76263ef 100644 --- a/src/frontpanel.rs +++ b/src/frontpanel.rs @@ -98,7 +98,7 @@ impl Widget for &mut Frontpanel<'_> { ); let led_textures = led::Textures::new(self.textures.led_on.clone(), self.textures.led_off.clone()); - let resp = ui.allocate_response(vec2(800.0, 333.0), Sense::click()); + let mut resp = ui.allocate_response(vec2(800.0, 333.0), Sense::click()); resp.request_focus(); let fp_rect = resp.rect; ui.allocate_ui_at_rect(fp_rect, |ui| { @@ -136,6 +136,7 @@ impl Widget for &mut Frontpanel<'_> { { self.state.power = !power_inv; self.interaction = Some(FrontpanelInteraction::Power(self.state.power)); + resp.mark_changed(); }; }); } @@ -162,6 +163,7 @@ impl Widget for &mut Frontpanel<'_> { { self.state.ad_sws = (self.state.ad_sws & !(bit_mask)) | (u16::from(sw_state) << (16 - i)); + resp.mark_changed(); }; }); } @@ -206,6 +208,7 @@ impl Widget for &mut Frontpanel<'_> { _ => unreachable!(), }; self.interaction = Some(FrontpanelInteraction::ActionSw(sw, *state)); + resp.mark_changed(); }; }); }