Remember directory
This commit is contained in:
@@ -32,6 +32,8 @@ using namespace juce;
|
||||
JaySynthAudioProcessorEditor::JaySynthAudioProcessorEditor (JaySynthAudioProcessor* ownerFilter, bool has_wt)
|
||||
: AudioProcessorEditor (ownerFilter)
|
||||
{
|
||||
m_fileChooserDirectory = File::getSpecialLocation (File::currentExecutableFile).getParentDirectory();
|
||||
|
||||
addAndMakeVisible (m_label_colon = new Label ("Colon",
|
||||
TRANS(":")));
|
||||
m_label_colon->setFont (Font ("Times New Roman", 20.00f, Font::plain));
|
||||
@@ -4932,42 +4934,46 @@ void JaySynthAudioProcessorEditor::buttonClicked (Button* buttonThatWasClicked)
|
||||
if (buttonThatWasClicked == m_button_bank_load)
|
||||
{
|
||||
String filePatterns("*.fxb;*.xml");
|
||||
FileChooser fc("Load bank", File::nonexistent, filePatterns, false);
|
||||
FileChooser fc("Load bank", m_fileChooserDirectory, filePatterns, false);
|
||||
if (fc.browseForFileToOpen())
|
||||
{
|
||||
File const &file = fc.getResult();
|
||||
getProcessor()->loadBank(file);
|
||||
m_fileChooserDirectory = file;
|
||||
}
|
||||
}
|
||||
else if (buttonThatWasClicked == m_button_bank_save)
|
||||
{
|
||||
String filePatterns("*.fxb;*.xml");
|
||||
FileChooser fc("Save bank", File::nonexistent, filePatterns, false);
|
||||
FileChooser fc("Save bank", m_fileChooserDirectory, filePatterns, false);
|
||||
if (fc.browseForFileToSave(true))
|
||||
{
|
||||
File const &file = fc.getResult();
|
||||
getProcessor()->saveBank(file);
|
||||
m_fileChooserDirectory = file;
|
||||
}
|
||||
}
|
||||
else if (buttonThatWasClicked == m_button_patch_load)
|
||||
{
|
||||
String filePatterns("*.fxp;*.xml");
|
||||
FileChooser fc("Load patch", File::nonexistent, filePatterns, false);
|
||||
FileChooser fc("Load patch", m_fileChooserDirectory, filePatterns, false);
|
||||
if (fc.browseForFileToOpen())
|
||||
{
|
||||
File const &file = fc.getResult();
|
||||
getProcessor()->loadPatch(file, 0);
|
||||
m_fileChooserDirectory = file;
|
||||
}
|
||||
}
|
||||
else if (buttonThatWasClicked == m_button_patch_save)
|
||||
{
|
||||
String filePatterns("*.fxp;*.xml");
|
||||
FileChooser fc("Save patch", File::nonexistent, filePatterns, false);
|
||||
FileChooser fc("Save patch", m_fileChooserDirectory, filePatterns, false);
|
||||
if (fc.browseForFileToSave(true))
|
||||
{
|
||||
File const &file = fc.getResult();
|
||||
getProcessor()->savePatch(file, 0);
|
||||
}
|
||||
m_fileChooserDirectory = file;
|
||||
}
|
||||
}
|
||||
else if (buttonThatWasClicked == m_button_patch_incr)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user