diff --git a/README.md b/README.md index b1185cae1..ae8a4e4ef 100644 --- a/README.md +++ b/README.md @@ -76,9 +76,17 @@ You can use externals inside plugdata's plugin version by recompiling the extern - Add your sources to the "externals" target inside Libraries/CMakeLists.txt. Alternatively the source files can be placed inside the Libraries/ELSE/Source folder, as all .c files in that folder will be compiled automatically. - In Libraries/libpd/x_libpd_multi.c, add the setup function for your external. The best place to call your setup function is inside libpd_init_pdlua. libpd_init_else and libpd_init_cyclone will also work, but it has the side-effect that the externals will also be available under the else/* and cyclone/* prefix. +## Corporate sponsors +

+ + + + + + +

## Credits -Supported by [Deskew Technologies](https://gigperformer.com) - Logo by [Bas de Bruin](https://www.bdebruin.nl/), based on concept by [Joshua A.C. Newman](https://glyphpress.com/talk/) - [Camomile](https://github.com/pierreguillot/Camomile) by Pierre Guillot - [ELSE](https://github.com/porres/pd-else) by Alexandre Torres Porres diff --git a/Source/Dialogs/Dialogs.cpp b/Source/Dialogs/Dialogs.cpp index f3a36bd92..35e16ec53 100644 --- a/Source/Dialogs/Dialogs.cpp +++ b/Source/Dialogs/Dialogs.cpp @@ -630,7 +630,8 @@ void Dialogs::showOpenDialog(std::function callback, bool canSelect fileChooser->launchAsync(openChooserFlags, [callback, lastFileId](FileChooser const& fileChooser) { auto result = fileChooser.getResult(); - SettingsFile::getInstance()->setLastBrowserPathForId(lastFileId, result); + auto lastDir = result.isDirectory() ? result : result.getParentDirectory(); + SettingsFile::getInstance()->setLastBrowserPathForId(lastFileId, lastDir); callback(result); }); } @@ -661,7 +662,7 @@ void Dialogs::showSaveDialog(std::function callback, const String& auto parentDirectory = result.getParentDirectory(); if(parentDirectory.exists()) { SettingsFile::getInstance()->setLastBrowserPathForId(lastFileId, parentDirectory); + callback(result); } - callback(result); }); }