From 49257dc73cc258c1df82243ef5ec6b494cefea4b Mon Sep 17 00:00:00 2001 From: Luke Street Date: Tue, 21 Nov 2023 11:49:26 -0500 Subject: [PATCH] Better logic to reload previous file on app start Before, if "Rebuild on changes" was disabled, the last file wouldn't be properly loaded when starting. --- src/app.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app.rs b/src/app.rs index b06f3bc..b0e49d7 100644 --- a/src/app.rs +++ b/src/app.rs @@ -234,7 +234,9 @@ impl App { if config.project_dir.is_some() { config.config_change = true; config.watcher_change = true; - app.modified.store(true, Ordering::Relaxed); + } + if config.selected_obj.is_some() { + config.queue_build = true; } app.view_state.config_state.queue_check_update = config.auto_update_check; app.config = Arc::new(RwLock::new(config));