Rename EguiState::open to is_open
This makes it more clear that it doesn't actually open the editor.
This commit is contained in:
parent
d9ac60ae85
commit
07f9a18d3d
|
@ -80,7 +80,8 @@ impl EguiState {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the GUI is currently visible.
|
/// Whether the GUI is currently visible.
|
||||||
pub fn open(&self) -> bool {
|
// Called `is_open()` instead of `open()` to avoid the ambiguity.
|
||||||
|
pub fn is_open(&self) -> bool {
|
||||||
self.open.load(Ordering::Acquire)
|
self.open.load(Ordering::Acquire)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,7 +180,7 @@ impl Plugin for Gain {
|
||||||
|
|
||||||
// To save resources, a plugin can (and probably should!) only perform expensive
|
// To save resources, a plugin can (and probably should!) only perform expensive
|
||||||
// calculations that are only displayed on the GUI while the GUI is open
|
// calculations that are only displayed on the GUI while the GUI is open
|
||||||
if self.editor_state.open() {
|
if self.editor_state.is_open() {
|
||||||
amplitude = (amplitude / num_samples as f32).abs();
|
amplitude = (amplitude / num_samples as f32).abs();
|
||||||
let current_peak_meter = self.peak_meter.load(std::sync::atomic::Ordering::Relaxed);
|
let current_peak_meter = self.peak_meter.load(std::sync::atomic::Ordering::Relaxed);
|
||||||
let new_peak_meter = if amplitude > current_peak_meter {
|
let new_peak_meter = if amplitude > current_peak_meter {
|
||||||
|
|
Loading…
Reference in a new issue