Add properties file stuff. Store and restore last file import folder.

This commit is contained in:
xenakios
2017-12-19 05:24:27 +02:00
parent a8e70b76b7
commit 77f514701c
3 changed files with 30 additions and 2 deletions

View File

@ -186,7 +186,9 @@ void PaulstretchpluginAudioProcessorEditor::addAudioBlock(AudioBuffer<float>& bu
void PaulstretchpluginAudioProcessorEditor::chooseFile()
{
File initialloc = File::getSpecialLocation(File::userHomeDirectory);
String initiallocfn = processor.m_propsfile->m_props_file->getValue("importfilefolder",
File::getSpecialLocation(File::userHomeDirectory).getFullPathName());
File initialloc(initiallocfn);
String filterstring = processor.m_afm->getWildcardForAllFormats();
FileChooser myChooser("Please select audio file...",
initialloc,
@ -200,6 +202,7 @@ void PaulstretchpluginAudioProcessorEditor::chooseFile()
pathname = pathname.substring(10);
resu = File(pathname);
}
processor.m_propsfile->m_props_file->setValue("importfilefolder", resu.getParentDirectory().getFullPathName());
m_last_err = processor.setAudioFile(resu);
if (processor.getAudioFile() != File())
{