From 2d9183647c7933b2123fc7254be2e9c411eb08ec Mon Sep 17 00:00:00 2001 From: vaneri-9 Date: Wed, 30 Aug 2023 10:32:54 +0200 Subject: [PATCH] Fix bug with open crashing egui --- src/gui_egui/gui.rs | 1 - src/gui_egui/keymap.rs | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui_egui/gui.rs b/src/gui_egui/gui.rs index 9f2f12cd..34feb683 100644 --- a/src/gui_egui/gui.rs +++ b/src/gui_egui/gui.rs @@ -40,7 +40,6 @@ pub fn gui(cs: ComponentStore, path: &PathBuf) -> Result<(), eframe::Error> { let options = eframe::NativeOptions::default(); let path = path.to_owned(); simulator.save_dot(&path); - println!("contexts: {:?}", contexts); let gui = Gui { path, diff --git a/src/gui_egui/keymap.rs b/src/gui_egui/keymap.rs index 02234ec2..3359295d 100644 --- a/src/gui_egui/keymap.rs +++ b/src/gui_egui/keymap.rs @@ -251,6 +251,7 @@ pub fn file_open_fn(gui: &mut Gui) { gui.path = path_buf; } let cs = ComponentStore::load_file(&gui.path); + gui.contexts = create_contexts(&cs.store); match gui.editor_use { true => { if let Some(e) = gui.editor.as_mut() {