Handle example/demo patches as templates
Closes #270 Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
0de51ecba8
commit
a37016969d
3 changed files with 10 additions and 4 deletions
|
@ -151,11 +151,17 @@ void loadDialog()
|
|||
#endif
|
||||
}
|
||||
|
||||
void loadPathDialog(const std::string& path)
|
||||
void loadPathDialog(const std::string& path, const bool asTemplate)
|
||||
{
|
||||
#ifndef HEADLESS
|
||||
promptClear("The current patch is unsaved. Clear it and open the new patch?", [path]() {
|
||||
promptClear("The current patch is unsaved. Clear it and open the new patch?", [path, asTemplate]() {
|
||||
APP->patch->loadAction(path);
|
||||
|
||||
if (asTemplate)
|
||||
{
|
||||
APP->patch->path = "";
|
||||
APP->history->setSaved();
|
||||
}
|
||||
});
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue