do not offer combine operation for MIDI (see comment in libs/ardour/midi_playlist_source.cc for an explanation)
git-svn-id: svn://localhost/ardour2/branches/3.0@9630 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
0a9f5423f5
commit
c937a67f6e
|
@ -1067,7 +1067,11 @@ Editor::sensitize_the_right_region_actions ()
|
|||
_region_actions->get_action("show-region-list-editor")->set_sensitive (false);
|
||||
_region_actions->get_action("show-region-properties")->set_sensitive (false);
|
||||
_region_actions->get_action("rename-region")->set_sensitive (false);
|
||||
_region_actions->get_action("combine-regions")->set_sensitive (true);
|
||||
if (have_audio) {
|
||||
_region_actions->get_action("combine-regions")->set_sensitive (true);
|
||||
} else {
|
||||
_region_actions->get_action("combine-regions")->set_sensitive (false);
|
||||
}
|
||||
} else if (rs.size() == 1) {
|
||||
_region_actions->get_action("add-range-markers-from-region")->set_sensitive (false);
|
||||
_region_actions->get_action("close-region-gaps")->set_sensitive (false);
|
||||
|
|
|
@ -38,6 +38,12 @@ MidiListEditor::MidiListEditor (Session* s, boost::shared_ptr<MidiRegion> r)
|
|||
: ArdourDialog (r->name(), false, false)
|
||||
, region (r)
|
||||
{
|
||||
/* We do not handle nested sources/regions. Caller should have tackled this */
|
||||
|
||||
if (r->max_source_level() > 0) {
|
||||
throw failed_constructor();
|
||||
}
|
||||
|
||||
set_session (s);
|
||||
|
||||
model = ListStore::create (columns);
|
||||
|
|
|
@ -2488,7 +2488,12 @@ void add_region_to_list (RegionView* rv, Playlist::RegionList* l)
|
|||
RegionView*
|
||||
RouteTimeAxisView::combine_regions ()
|
||||
{
|
||||
assert (is_track());
|
||||
/* as of may 2011, we do not offer uncombine for MIDI tracks
|
||||
*/
|
||||
|
||||
if (!is_audio_track()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!_view) {
|
||||
return 0;
|
||||
|
@ -2515,7 +2520,11 @@ RouteTimeAxisView::combine_regions ()
|
|||
void
|
||||
RouteTimeAxisView::uncombine_regions ()
|
||||
{
|
||||
assert (is_track());
|
||||
/* as of may 2011, we do not offer uncombine for MIDI tracks
|
||||
*/
|
||||
if (!is_audio_track()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_view) {
|
||||
return;
|
||||
|
|
|
@ -46,11 +46,22 @@ using namespace std;
|
|||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
||||
/*******************************************************************************
|
||||
As of May 2011, it appears too complex to support compound regions for MIDI
|
||||
because of the need to be able to edit the data represented by the region. It
|
||||
seems that it would be a better idea to render the consituent regions into a
|
||||
new MIDI file and create a new region based on that, an operation we have been
|
||||
calling "consolidate"
|
||||
|
||||
This code has been in place as a stub in case anyone gets any brilliant ideas
|
||||
on other ways to approach this issue.
|
||||
********************************************************************************/
|
||||
|
||||
MidiPlaylistSource::MidiPlaylistSource (Session& s, const ID& orig, const std::string& name, boost::shared_ptr<MidiPlaylist> p,
|
||||
uint32_t chn, frameoffset_t begin, framecnt_t len, Source::Flag flags)
|
||||
: Source (s, DataType::AUDIO, name)
|
||||
: Source (s, DataType::MIDI, name)
|
||||
, MidiSource (s, name, flags)
|
||||
, PlaylistSource (s, orig, name, p, DataType::AUDIO, begin, len, flags)
|
||||
, PlaylistSource (s, orig, name, p, DataType::MIDI, begin, len, flags)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -157,15 +168,13 @@ MidiPlaylistSource::append_event_unlocked_frames(const Evoral::Event<framepos_t>
|
|||
void
|
||||
MidiPlaylistSource::load_model (bool, bool)
|
||||
{
|
||||
fatal << string_compose (_("programming error: %1"), "MidiPlaylistSource::load_model() called - should be impossible") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
/* nothing to do */
|
||||
}
|
||||
|
||||
void
|
||||
MidiPlaylistSource::destroy_model ()
|
||||
{
|
||||
fatal << string_compose (_("programming error: %1"), "MidiPlaylistSource::destroy_model() called - should be impossible") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
/* nothing to do */
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue
Block a user