Add OperationView::operations

This commit is contained in:
Hanno Braun 2024-12-10 18:37:04 +01:00
parent 78f911b8d0
commit 424f90643d
2 changed files with 5 additions and 1 deletions

View File

@ -78,7 +78,7 @@ impl TextRenderer {
},
);
for (i, op) in operations.ops_log.operations.iter().enumerate() {
for (i, op) in operations.operations().iter().enumerate() {
let mut attrs = glyphon::Attrs::new();
if i == operations.selected {

View File

@ -13,6 +13,10 @@ impl OperationView {
}
}
pub fn operations(&self) -> Vec<Box<dyn Operation>> {
self.ops_log.children()
}
pub fn select_last(&mut self) {
self.selected = self.ops_log.operations.len().saturating_sub(1);
}