diff options
author | André Nusser <andre.nusser@googlemail.com> | 2015-10-12 12:29:16 +0200 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-10-21 23:28:44 -0400 |
commit | 5d50abed75de5428c025e61224068387ab15e26d (patch) | |
tree | c1894e776615765c95ef2790f3a8f740a8e4fbda /gtk2_ardour/route_ui.cc | |
parent | 67f557b1f4fd1f1ecd9d38f14d83a12a294cb455 (diff) |
Confirmation on overwrite for track and session templates. -fixes #6587
Diffstat (limited to 'gtk2_ardour/route_ui.cc')
-rw-r--r-- | gtk2_ardour/route_ui.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index 79506f7bd3..2f45756c27 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -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); } |