seperate toolbox and app model to be able to store additional data per toolbox

This commit is contained in:
2022-05-21 19:11:03 +02:00
parent 4366ec578d
commit 6366932aca
4 changed files with 89 additions and 25 deletions

View File

@@ -12,11 +12,12 @@ mod ui;
fn main() {
let toolbx_list = VecDeque::from(ToolbxContainer::get_toolboxes());
let factory_vec = FactoryVecDeque::from_vec_deque(toolbx_list);
let model = AppModel {
let factory_vec = FactoryVecDeque::new();
let mut model = AppModel {
toolboxes: factory_vec,
};
model.update_toolbxes(toolbx_list.into_iter());
let app = RelmApp::new(model);
app.run();
}