Skip to content

Commit 07f3ba5

Browse files
fix(oscilloscope): only clear snapshots in the terminal case
Signed-off-by: Maika Namuo <httpworldview@gmail.com>
1 parent 6f794a5 commit 07f3ba5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/visuals/registry.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use crate::{
1515
persistence::settings::{
1616
self as settings_cfg, ModuleSettings, PaletteSettings, ThemeFile, VisualSettings,
1717
},
18-
util::audio::DEFAULT_SAMPLE_RATE,
18+
util::audio::{Channel, DEFAULT_SAMPLE_RATE},
1919
util::color::{sanitize_stop_positions, sanitize_stop_spreads},
2020
};
2121
use iced::{Color, Element, Length, widget::container};
@@ -133,7 +133,7 @@ visuals! {
133133
Oscilloscope(150.0, 160.0, 100.0) =>
134134
oscilloscope::OscilloscopeProcessor, OscilloscopeConfig, OscilloscopeState;
135135
settings_cfg::OscilloscopeSettings;
136-
apply(p, s, set) { let before = p.config(); visuals!(@apply_config p, set); let reset = p.config() != before;
136+
apply(p, s, set) { visuals!(@apply_config p, set); let reset = [set.channel_1, set.channel_2] == [Channel::None; 2];
137137
let mut st = s.borrow_mut(); st.update_view_settings(set.persistence, reset);
138138
visuals!(@apply_palette st, set, &palettes::oscilloscope::COLORS); };
139139
export(p, s) { let st = s.borrow(); let mut out = settings_cfg::OscilloscopeSettings::from_config(&p.config());

0 commit comments

Comments
 (0)