| @@ -33,7 +33,7 @@ struct Manager { | |||||
| /** Saves the patch and nothing else. */ | /** Saves the patch and nothing else. */ | ||||
| void save(std::string path); | void save(std::string path); | ||||
| void saveDialog(); | void saveDialog(); | ||||
| void saveAsDialog(); | |||||
| void saveAsDialog(bool setPath = true); | |||||
| void saveTemplateDialog(); | void saveTemplateDialog(); | ||||
| void saveAutosave(); | void saveAutosave(); | ||||
| void cleanAutosave(); | void cleanAutosave(); | ||||
| @@ -97,6 +97,10 @@ struct FileButton : MenuButton { | |||||
| APP->patch->saveAsDialog(); | APP->patch->saveAsDialog(); | ||||
| })); | })); | ||||
| menu->addChild(createMenuItem("Save a copy", "", []() { | |||||
| APP->patch->saveAsDialog(false); | |||||
| })); | |||||
| menu->addChild(createMenuItem("Save template", "", []() { | menu->addChild(createMenuItem("Save template", "", []() { | ||||
| APP->patch->saveTemplateDialog(); | APP->patch->saveTemplateDialog(); | ||||
| })); | })); | ||||
| @@ -126,7 +126,7 @@ void Manager::saveDialog() { | |||||
| } | } | ||||
| void Manager::saveAsDialog() { | |||||
| void Manager::saveAsDialog(bool setPath) { | |||||
| std::string dir; | std::string dir; | ||||
| std::string filename; | std::string filename; | ||||
| if (this->path == "") { | if (this->path == "") { | ||||
| @@ -156,7 +156,9 @@ void Manager::saveAsDialog() { | |||||
| } | } | ||||
| APP->history->setSaved(); | APP->history->setSaved(); | ||||
| this->path = path; | |||||
| if (setPath) { | |||||
| this->path = path; | |||||
| } | |||||
| try { | try { | ||||
| save(path); | save(path); | ||||