mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
Confirmation on overwrite for track and session templates. -fixes #6587
This commit is contained in:
parent
67f557b1f4
commit
5d50abed75
4 changed files with 44 additions and 12 deletions
|
|
@ -1863,13 +1863,20 @@ RouteUI::save_as_template ()
|
|||
return;
|
||||
}
|
||||
|
||||
p.hide ();
|
||||
p.get_result (name, true);
|
||||
|
||||
safe_name = legalize_for_path (name);
|
||||
safe_name += template_suffix;
|
||||
|
||||
path = Glib::build_filename (path, safe_name);
|
||||
if (Glib::file_test (path, Glib::FILE_TEST_EXISTS)) {
|
||||
bool overwrite = overwrite_file_dialog (_("Confirm Template Overwrite"),
|
||||
_("A template already exists with that name. Do you want to overwrite it?"));
|
||||
|
||||
if (!overwrite) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
_route->save_as_template (path, name);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue