mirror of
https://github.com/hannobraun/Fornjot
synced 2025-02-21 14:45: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) => {
|
Key::Named(NamedKey::ArrowRight) => {
|
||||||
self.view.selected_mut().select_last();
|
self.view.selected_mut().select_last();
|
||||||
}
|
}
|
||||||
|
Key::Named(NamedKey::ArrowLeft) => {
|
||||||
|
self.view.parent_of_selected_mut().select_none();
|
||||||
|
}
|
||||||
Key::Named(NamedKey::ArrowDown) => {
|
Key::Named(NamedKey::ArrowDown) => {
|
||||||
self.view.parent_of_selected_mut().select_next();
|
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 {
|
pub fn selected(&self) -> &Self {
|
||||||
self.selected
|
self.selected
|
||||||
.and_then(|selected| self.children.get(selected))
|
.and_then(|selected| self.children.get(selected))
|
||||||
|
Loading…
Reference in New Issue
Block a user