mirror of
https://github.com/robbert-vdh/nih-plug.git
synced 2026-07-01 02:36:54 +00:00
Consume the XyPadEvent
This doesn't need to be propagated up the tree.
This commit is contained in:
@@ -282,7 +282,7 @@ impl View for XyPad {
|
||||
}
|
||||
|
||||
fn event(&mut self, cx: &mut EventContext, event: &mut Event) {
|
||||
event.map(|window_event, _meta| {
|
||||
event.map(|window_event, meta| {
|
||||
// With an `if let` clippy complains about the irrefutable match, but in case we add
|
||||
// more events it's a good idea to prevent this from acting as a wildcard.
|
||||
let XyPadEvent::TooltipWidthChanged = window_event;
|
||||
@@ -294,6 +294,8 @@ impl View for XyPad {
|
||||
if cx.hovered() == cx.current() {
|
||||
self.update_tooltip_pos(cx);
|
||||
}
|
||||
|
||||
meta.consume();
|
||||
});
|
||||
|
||||
event.map(|window_event, meta| match window_event {
|
||||
|
||||
Reference in New Issue
Block a user