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 d8ab66cb746cd4c448009ef308ab24f01c168928
parent 478309ebfe13474caf5562ead4331e68fa3488c7
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date:   Sun,  9 Jun 2024 15:55:48 +0200

do not call begin/end gesture is parameter is not public

Diffstat:
Msource/jucePluginLib/parameter.cpp | 13+++++++++++++
Msource/jucePluginLib/parameter.h | 11+++--------
2 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/source/jucePluginLib/parameter.cpp b/source/jucePluginLib/parameter.cpp @@ -263,4 +263,17 @@ namespace pluginLib m_derivedParameters.insert(_param); _param->m_derivedParameters.insert(this); } + + Parameter::ScopedChangeGesture::ScopedChangeGesture(Parameter& _p) : m_parameter(_p) + { + if(_p.getDescription().isPublic) + _p.pushChangeGesture(); + } + + Parameter::ScopedChangeGesture::~ScopedChangeGesture() + { + if(m_parameter.getDescription().isPublic) + m_parameter.popChangeGesture(); + } + } diff --git a/source/jucePluginLib/parameter.h b/source/jucePluginLib/parameter.h @@ -102,14 +102,9 @@ namespace pluginLib struct ScopedChangeGesture { - explicit ScopedChangeGesture(Parameter& _p) : m_parameter(_p) - { - _p.pushChangeGesture(); - } - ~ScopedChangeGesture() - { - m_parameter.popChangeGesture(); - } + explicit ScopedChangeGesture(Parameter& _p); + ~ScopedChangeGesture(); + private: Parameter& m_parameter; };