Prevent body events pane is picked / dragging
This commit is contained in:
parent
2a49e415d2
commit
be65a847b0
2 changed files with 24 additions and 10 deletions
|
|
@ -452,17 +452,26 @@ where
|
|||
_ => {}
|
||||
}
|
||||
|
||||
let picked_pane = self.state.picked_pane().map(|(pane, _)| pane);
|
||||
|
||||
self.elements
|
||||
.iter_mut()
|
||||
.zip(layout.children())
|
||||
.map(|((_, pane), layout)| {
|
||||
pane.on_event(
|
||||
.map(|((pane, content), layout)| {
|
||||
let is_picked = if let Some(picked_pane) = picked_pane {
|
||||
picked_pane == *pane
|
||||
} else {
|
||||
false
|
||||
};
|
||||
|
||||
content.on_event(
|
||||
event.clone(),
|
||||
layout,
|
||||
cursor_position,
|
||||
renderer,
|
||||
clipboard,
|
||||
messages,
|
||||
is_picked,
|
||||
)
|
||||
})
|
||||
.fold(event_status, event::Status::merge)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue