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
|
@ -239,28 +239,6 @@ static void CardinalModuleWidget__createContextMenu(ModuleWidget* const w,
|
|||
w->appendContextMenu(menu);
|
||||
}
|
||||
|
||||
static void CardinalModuleWidget__loadSelectionDialog(RackWidget* const w)
|
||||
{
|
||||
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);
|
||||
});
|
||||
}
|
||||
|
||||
static void CardinalModuleWidget__saveSelectionDialog(RackWidget* const w)
|
||||
{
|
||||
std::string selectionDir = asset::user("selections");
|
||||
|
@ -355,11 +333,6 @@ void appendSelectionContextMenu(ui::Menu* const menu)
|
|||
w->pasteClipboardAction();
|
||||
}, false, true));
|
||||
|
||||
// Load
|
||||
menu->addChild(createMenuItem("Import selection", "", [w]() {
|
||||
CardinalModuleWidget__loadSelectionDialog(w);
|
||||
}, false, true));
|
||||
|
||||
// Save
|
||||
menu->addChild(createMenuItem("Save selection as", "", [w]() {
|
||||
CardinalModuleWidget__saveSelectionDialog(w);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue