Skip to content

Commit

Permalink
Fixed Parameter::setUserValueAsUserAction with internal params
Browse files Browse the repository at this point in the history
  • Loading branch information
FigBug committed Feb 14, 2024
1 parent e586d06 commit 12c778c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions modules/gin_plugin/components/gin_parambox.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,17 @@ class ParamBox : public MultiParamComponent
paramChanged();
}

void addEnable (gin::Parameter::Ptr p)
void addEnable (gin::Parameter::Ptr p, bool includeButton = true)
{
enableParam = p;

auto b = new SVGPluginButton (p, Assets::power);
b->setBounds (6, 6, 12, 12);
controls.add (b);
addAndMakeVisible (b);
if (includeButton)
{
auto b = new SVGPluginButton (p, Assets::power);
b->setBounds (6, 6, 12, 12);
controls.add (b);
addAndMakeVisible (b);
}

watchParam (p);
}
Expand Down
2 changes: 1 addition & 1 deletion modules/gin_plugin/plugin/gin_parameter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void Parameter::setUserValueAsUserAction (float f)
beginUserAction();

if (internal)
setValue (f);
setUserValue (f);
else
setUserValueNotifingHost (f);

Expand Down

0 comments on commit 12c778c

Please sign in to comment.