Fix mouse interrupting file/dir editing in project panel

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
Petros Amoiridis 2023-01-18 15:22:20 +02:00
parent 2c3c8b4cb0
commit f8d092fdc6
No known key found for this signature in database

View file

@ -1176,6 +1176,7 @@ impl ProjectPanel {
)
})
.on_click(MouseButton::Left, move |e, cx| {
if !show_editor {
if kind == EntryKind::Dir {
cx.dispatch_action(ToggleExpanded(entry_id))
} else {
@ -1184,6 +1185,7 @@ impl ProjectPanel {
change_focus: e.click_count > 1,
})
}
}
})
.on_down(MouseButton::Right, move |e, cx| {
cx.dispatch_action(DeployContextMenu {