diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2020-01-22 15:02:49 -0700 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2020-01-23 14:25:38 -0700 |
commit | 87a5990e54c3b4cc43ceaae023b8dfcb902169dd (patch) | |
tree | 52038c8b7bbc71fd008bbc9fe9ec82792d5feef3 /libs/ardour/midi_region.cc | |
parent | 24f8a90278e0578a755933a4361920ba7e040289 (diff) |
MIDI-region specific naming logic
plus slight cleanup of Region::set_name().
Note that issues with ARDOUR::legalize_for_path() not excluding colons still remain
Diffstat (limited to 'libs/ardour/midi_region.cc')
-rw-r--r-- | libs/ardour/midi_region.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libs/ardour/midi_region.cc b/libs/ardour/midi_region.cc index f89f04fd21..0f9bb5c346 100644 --- a/libs/ardour/midi_region.cc +++ b/libs/ardour/midi_region.cc @@ -823,3 +823,17 @@ MidiRegion::trim_to_internal (samplepos_t position, samplecnt_t length, const in send_change (what_changed); } } + +bool +MidiRegion::set_name (const std::string& str) +{ + if (_name == str) { + return true; + } + + if (Session::session_name_is_legal (str) != 0) { + return false; + } + + return Region::set_name (str); +} |