gearmulator

Emulation of classic VA synths of the late 90s/2000s that are based on Motorola 56300 family DSPs
Log | Files | Refs | Submodules | README | LICENSE

commit f2fb41db86f780b47d0e3d312e60247587e89181
parent 28bdb4aefae4e9dd78bcc068bd2e4ddeddbfd616
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date:   Tue, 15 Mar 2022 21:27:55 +0100

fix playmode buttons state incorrect after startup

Diffstat:
Msource/jucePlugin/ui3/VirusEditor.cpp | 8++++++++
Msource/jucePlugin/ui3/VirusEditor.h | 2++
2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/source/jucePlugin/ui3/VirusEditor.cpp b/source/jucePlugin/ui3/VirusEditor.cpp @@ -23,6 +23,7 @@ namespace genericVirusUI m_playModeSingle->onClick = [this]{ setPlayMode(virusLib::PlayMode::PlayModeSingle); }; m_playModeMulti->onClick = [this]{ setPlayMode(virusLib::PlayMode::PlayModeMulti); }; + updatePlayModeButtons(); if(m_romSelector) { @@ -60,6 +61,7 @@ namespace genericVirusUI { m_parts.onPlayModeChanged(); updatePresetName(); + updatePlayModeButtons(); } void VirusEditor::onCurrentPartChanged() @@ -130,6 +132,12 @@ namespace genericVirusUI m_presetName->setText(getController().getCurrentPartPresetName(getController().getCurrentPart()), juce::dontSendNotification); } + void VirusEditor::updatePlayModeButtons() const + { + m_playModeSingle->setToggleState(!getController().isMultiMode(), juce::dontSendNotification); + m_playModeMulti->setToggleState(getController().isMultiMode(), juce::dontSendNotification); + } + void VirusEditor::setPlayMode(uint8_t _playMode) { getController().getParameter(Virus::Param_PlayMode)->setValue(_playMode); diff --git a/source/jucePlugin/ui3/VirusEditor.h b/source/jucePlugin/ui3/VirusEditor.h @@ -30,6 +30,8 @@ namespace genericVirusUI void updateControlLabel(juce::Component* _component) const; void updatePresetName() const; + void updatePlayModeButtons() const; + void setPlayMode(uint8_t _playMode);