fallback to defaults when reloading settings
there was only message, but no actual fallback
@@ -799,6 +799,16 @@ impl Editor {
self.settings = settings;
Log::info("Editor settings were reloaded successfully!");
+ }
+ Err(e) => {
+ self.settings = Default::default();
+
+ Log::info(format!(
+ "Failed to load settings, fallback to default. Reason: {:?}",
+ e
+ ))
+ }
+ }
self.menu
.file_menu
@@ -818,12 +828,6 @@ impl Editor {
)),
}
}
- Err(e) => Log::info(format!(
- "Failed to load settings, fallback to default. Reason: {:?}",
- e
- )),
- }
- }
fn set_scene(&mut self, mut scene: Scene, path: Option<PathBuf>) {
// Discard previous scene.
