| 320 | |
| 321 | |
| 322 | void 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 | |
| 346 | void Manager::loadTemplateDialog() { |