Remove unconditional invalidation when calling mouse region handlers

We want invalidation to opt-in as much as possible.
If you want a view to re-render, you need to call `cx.notify`.
This commit is contained in:
Nathan Sobo
2022-10-14 17:06:46 -06:00
parent ad6f9b2499
commit 934474f87e
3 changed files with 4 additions and 5 deletions
+2 -2
View File
@@ -354,7 +354,7 @@ impl InfoPopover {
.with_style(style.hover_popover.container)
.boxed()
})
.on_move(|_, _| {})
.on_move(|_, _| {}) // Consume move events so they don't reach regions underneath.
.with_cursor_style(CursorStyle::Arrow)
.with_padding(Padding {
bottom: HOVER_POPOVER_GAP,
@@ -400,7 +400,7 @@ impl DiagnosticPopover {
bottom: HOVER_POPOVER_GAP,
..Default::default()
})
.on_move(|_, _| {})
.on_move(|_, _| {}) // Consume move events so they don't reach regions underneath.
.on_click(MouseButton::Left, |_, cx| {
cx.dispatch_action(GoToDiagnostic)
})