summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_ops.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2020-01-22 15:03:05 -0700
committerPaul Davis <paul@linuxaudiosystems.com>2020-01-23 14:25:38 -0700
commit215d5d556fdb8ab95c044586e6eb803501bbe86e (patch)
tree47b181dc43b21c0b97aaf85a1bcd7d48e5a08cd9 /gtk2_ardour/editor_ops.cc
parent87a5990e54c3b4cc43ceaae023b8dfcb902169dd (diff)
handle possible failure of a region rename
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r--gtk2_ardour/editor_ops.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index d5e684546d..dd3e4f7a19 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -2943,8 +2943,12 @@ Editor::rename_region ()
std::string str = entry.get_text();
strip_whitespace_edges (str);
if (!str.empty()) {
- rs.front()->region()->set_name (str);
- _regions->redisplay ();
+ if (!rs.front()->region()->set_name (str)) {
+ ArdourMessageDialog msg (_("Rename failed. Check for characters such as '/' or ':'"));
+ msg.run ();
+ } else {
+ _regions->redisplay ();
+ }
}
}