Prevent body events pane is picked / dragging

This commit is contained in:
Cory Forsstrom 2021-07-27 15:41:45 -07:00
parent 2a49e415d2
commit be65a847b0
2 changed files with 24 additions and 10 deletions

View file

@ -149,6 +149,7 @@ where
renderer: &Renderer,
clipboard: &mut dyn Clipboard,
messages: &mut Vec<Message>,
is_picked: bool,
) -> event::Status {
let mut event_status = event::Status::Ignored;
@ -169,14 +170,18 @@ where
layout
};
let body_status = self.body.on_event(
event,
body_layout,
cursor_position,
renderer,
clipboard,
messages,
);
let body_status = if is_picked {
event::Status::Ignored
} else {
self.body.on_event(
event,
body_layout,
cursor_position,
renderer,
clipboard,
messages,
)
};
event_status.merge(body_status)
}