MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / saveTemplateDialog

Method saveTemplateDialog

src/override/ModuleWidget.cpp:718–727  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

716}
717
718void ModuleWidget::saveTemplateDialog() {
719 if (hasTemplate()) {
720 std::string message = string::f("Overwrite default preset for %s?", model->getFullName().c_str());
721 WeakPtr<ModuleWidget> weakThis = this;
722 async_dialog_message(message.c_str(), [=]{
723 if (weakThis)
724 weakThis->saveTemplate();
725 });
726 }
727}
728
729bool ModuleWidget::hasTemplate() {
730 std::string presetDir = model->getUserPresetDirectory();

Callers 1

createContextMenuMethod · 0.45

Calls 5

fFunction · 0.85
c_strMethod · 0.80
async_dialog_messageFunction · 0.50
getFullNameMethod · 0.45
saveTemplateMethod · 0.45

Tested by

no test coverage detected