set displayed filepath when loading in state

This commit is contained in:
Alex Birch
2018-04-11 00:52:44 +01:00
parent 114bb2f10a
commit e8177d51cd
8 changed files with 76 additions and 9 deletions

View File

@ -12,6 +12,7 @@
#include "PluginEditor.h"
#include "SoundfontSynthVoice.h"
#include "SoundfontSynthSound.h"
#include "ExposesComponents.h"
AudioProcessor* JUCE_CALLTYPE createPluginFilter();
@ -241,6 +242,10 @@ void JuicySFAudioProcessor::setStateInformation (const void* data, int sizeInByt
AudioProcessorEditor* editor = getActiveEditor();
if (editor != nullptr) {
editor->setSize(lastUIWidth, lastUIHeight);
jassert(dynamic_cast<ExposesComponents*> (editor) != nullptr);
ExposesComponents* exposesComponents = dynamic_cast<ExposesComponents*> (editor);
exposesComponents->getFilePicker().setDisplayedFilePath(soundFontPath);
}
// const String& currentSoundFontAbsPath = fluidSynthModel->getCurrentSoundFontAbsPath();