Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
FigBug committed Feb 18, 2024
1 parent 5cdafd1 commit 3bd415f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion modules/gin_plugin/components/gin_plugineditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ class TitleBar : public juce::Component,
void comboBoxChanged (juce::ComboBox* c) override;
void changeListenerCallback (juce::ChangeBroadcaster*) override;
void parentHierarchyChanged() override;

ProcessorEditor& editor;
Processor& slProc;

Expand Down
4 changes: 2 additions & 2 deletions modules/gin_plugin/plugin/gin_parameter.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class ModMatrix;
Parameters can optionally be added to a modmatrix
*/
class Parameter : public juce::AudioPluginInstance::HostedParameter,
protected juce::Timer,
protected juce::AsyncUpdater
public juce::AsyncUpdater,
protected juce::Timer
{
public:
using Ptr = Parameter*;
Expand Down
9 changes: 7 additions & 2 deletions modules/gin_plugin/plugin/gin_processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ void Processor::setCurrentProgram (int index)
{
auto p = programs[index];

if (! p->fullyLoaded )
if (! p->fullyLoaded)
p->loadFromFile (p->getPresetFile (getProgramDirectory()), true);

p->loadProcessor (*this);
Expand Down Expand Up @@ -537,7 +537,7 @@ void Processor::setStateInformation (const void* data, int sizeInBytes)

void Processor::setStateXml (const juce::String& text)
{
juce::ScopedValueSetter<bool> (loadingState, true);
juce::ScopedValueSetter<bool> svs (loadingState, true);

juce::XmlDocument doc (text);
std::unique_ptr<juce::XmlElement> rootE (doc.getDocumentElement());
Expand Down Expand Up @@ -600,8 +600,13 @@ void Processor::setStateXml (const juce::String& text)

paramE = paramE->getNextElementWithTagName ("param");
}

if (juce::MessageManager::getInstance()->isThisTheMessageThread())
for (auto pp : getPluginParameters())
pp->handleUpdateNowIfNeeded();
}
stateUpdated();
sendChangeMessage();

lastStateLoad = juce::Time::getCurrentTime();
}

0 comments on commit 3bd415f

Please sign in to comment.