Skip to content

Commit

Permalink
Load settings when GUI is created, not when synth is initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
greatest-ape committed Aug 28, 2022
1 parent ec8ff87 commit acf4ed2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions octasine/src/sync/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,13 @@ pub struct SyncState {
/// option of leaving this field empty is useful when benchmarking.
host: Option<HostCallback>,
pub patches: PatchBank,
settings: Settings,
}

impl SyncState {
pub fn new(host: Option<HostCallback>) -> Self {
Self {
host,
patches: built_in_patch_bank(),
settings: Settings::load_or_default(),
}
}

Expand Down Expand Up @@ -253,7 +251,7 @@ cfg_if::cfg_if! {
self.patches.have_patches_changed()
}
fn get_gui_settings(&self) -> crate::gui::GuiSettings {
self.settings.gui.clone()
Settings::load_or_default().gui
}
fn export_patch(&self) -> (String, Vec<u8>) {
let name = self.patches.get_current_patch_filename_for_export();
Expand Down

0 comments on commit acf4ed2

Please sign in to comment.