mirror of
https://github.com/hannobraun/Fornjot
synced 2025-02-20 22:25:51 +00:00
Support collapsing operations
This commit is contained in:
parent
788af1edc3
commit
3d1736b89e
@ -102,6 +102,9 @@ impl ApplicationHandler for App {
|
||||
Key::Named(NamedKey::ArrowRight) => {
|
||||
self.view.selected_mut().select_last();
|
||||
}
|
||||
Key::Named(NamedKey::ArrowLeft) => {
|
||||
self.view.parent_of_selected_mut().select_none();
|
||||
}
|
||||
Key::Named(NamedKey::ArrowDown) => {
|
||||
self.view.parent_of_selected_mut().select_next();
|
||||
}
|
||||
|
@ -63,6 +63,10 @@ impl OperationView {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn select_none(&mut self) {
|
||||
self.selected = None;
|
||||
}
|
||||
|
||||
pub fn selected(&self) -> &Self {
|
||||
self.selected
|
||||
.and_then(|selected| self.children.get(selected))
|
||||
|
Loading…
Reference in New Issue
Block a user