mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-09 12:28:29 +00:00
Make OperationView
work with any operation
This commit is contained in:
parent
3f0a76aaf4
commit
c4c139644e
@ -1,14 +1,14 @@
|
||||
use crate::geometry::{Operation, OpsLog};
|
||||
use crate::geometry::Operation;
|
||||
|
||||
pub struct OperationView {
|
||||
ops_log: OpsLog,
|
||||
ops_log: Box<dyn Operation>,
|
||||
selected: usize,
|
||||
}
|
||||
|
||||
impl OperationView {
|
||||
pub fn new(operation: OpsLog) -> Self {
|
||||
pub fn new(operation: impl Operation + 'static) -> Self {
|
||||
Self {
|
||||
ops_log: operation,
|
||||
ops_log: Box::new(operation),
|
||||
selected: 0,
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user