handle possible failure of a region rename

This commit is contained in:
Paul Davis 2020-01-22 15:03:05 -07:00
parent 87a5990e54
commit 215d5d556f
1 changed files with 6 additions and 2 deletions

View File

@ -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 ();
}
}
}