Update waveform component time selection when state restored. Should probably restructure all this stuff so that the GUI can ask for this stuff when it wants, instead of the AudioProcessor making calls into the GUI...

This commit is contained in:
xenakios
2017-11-15 21:47:26 +02:00
parent 4620ba818e
commit c283d719d0
2 changed files with 4 additions and 2 deletions

View File

@ -275,9 +275,10 @@ void PaulstretchpluginAudioProcessor::setStateInformation (const void* data, int
setAudioFile(f);
Timer::callAfterDelay(500, [this,f]()
{
callGUI([f](PaulstretchpluginAudioProcessorEditor* ed)
callGUI([f,this](PaulstretchpluginAudioProcessorEditor* ed)
{
ed->setAudioFile(f);
ed->m_wavecomponent.setTimeSelection({ *getFloatParameter(5),*getFloatParameter(6) });
}, false);
});