MCPcopy Create free account
hub / github.com/VCVRack/Rack / loadTemplate

Method loadTemplate

src/patch.cpp:322–343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

320
321
322void Manager::loadTemplate() {
323 try {
324 load(templatePath);
325 }
326 catch (Exception& e) {
327 // Try loading the system template patch
328 try {
329 load(factoryTemplatePath);
330 }
331 catch (Exception& e) {
332 std::string message = string::f(string::translate("patch.loadTemplateFailed"), e.what());
333 osdialog_message(OSDIALOG_INFO, OSDIALOG_OK, message.c_str());
334
335 clear();
336 clearAutosave();
337 }
338 }
339
340 // load() sets the patch's original patch, but we don't want to use that.
341 this->path = "";
342 APP->history->setSaved();
343}
344
345
346void Manager::loadTemplateDialog() {

Callers

nothing calls this directly

Calls 5

loadFunction · 0.85
translateFunction · 0.85
whatMethod · 0.80
setSavedMethod · 0.80
fFunction · 0.70

Tested by

no test coverage detected