Update Fundamental and Rack
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
3943e4c1e9
commit
fd1de47874
6 changed files with 45 additions and 32 deletions
|
@ -30,6 +30,7 @@
|
|||
#include "AsyncDialog.hpp"
|
||||
#include "PluginContext.hpp"
|
||||
|
||||
#include <asset.hpp>
|
||||
#include <context.hpp>
|
||||
#include <history.hpp>
|
||||
#include <patch.hpp>
|
||||
|
@ -117,6 +118,30 @@ void loadPathDialog(const std::string& path)
|
|||
#endif
|
||||
}
|
||||
|
||||
void loadSelectionDialog()
|
||||
{
|
||||
app::RackWidget* const w = APP->scene->rack;
|
||||
|
||||
std::string selectionDir = asset::user("selections");
|
||||
system::createDirectories(selectionDir);
|
||||
|
||||
async_dialog_filebrowser(false, selectionDir.c_str(), "Import selection", [w](char* pathC) {
|
||||
if (!pathC) {
|
||||
// No path selected
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
w->loadSelection(pathC);
|
||||
}
|
||||
catch (Exception& e) {
|
||||
async_dialog_message(e.what());
|
||||
}
|
||||
|
||||
std::free(pathC);
|
||||
});
|
||||
}
|
||||
|
||||
void loadTemplateDialog()
|
||||
{
|
||||
#ifndef HEADLESS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue