|
|
@@ -47,24 +47,22 @@ void PatchManager::init(std::string path) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
this->path = ""; |
|
|
|
if (load(asset::user("template.vcv"))) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (load(asset::system("template.vcv"))) { |
|
|
|
return; |
|
|
|
} |
|
|
|
reset(); |
|
|
|
} |
|
|
|
|
|
|
|
void PatchManager::reset() { |
|
|
|
APP->history->clear(); |
|
|
|
APP->scene->rack->clear(); |
|
|
|
APP->scene->rackScroll->reset(); |
|
|
|
// Fails silently if file does not exist |
|
|
|
load(asset::user("template.vcv")); |
|
|
|
legacy = 0; |
|
|
|
|
|
|
|
path = ""; |
|
|
|
if (load(asset::user("template.vcv"))) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (load(asset::system("template.vcv"))) { |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void PatchManager::resetDialog() { |
|
|
@@ -170,6 +168,7 @@ bool PatchManager::load(std::string path) { |
|
|
|
APP->history->clear(); |
|
|
|
APP->scene->rack->clear(); |
|
|
|
APP->scene->rackScroll->reset(); |
|
|
|
legacy = 0; |
|
|
|
fromJson(rootJ); |
|
|
|
return true; |
|
|
|
} |
|
|
|