mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 16:46:35 +01:00
Fit note range on adding regions to tracks during import (#4106).
git-svn-id: svn://localhost/ardour2/branches/3.0@12705 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
30573893a9
commit
5dc49d678f
1 changed files with 6 additions and 0 deletions
|
|
@ -27,6 +27,7 @@
|
||||||
#include "ardour/midi_region.h"
|
#include "ardour/midi_region.h"
|
||||||
#include "ardour/midi_source.h"
|
#include "ardour/midi_source.h"
|
||||||
#include "ardour/midi_track.h"
|
#include "ardour/midi_track.h"
|
||||||
|
#include "ardour/operations.h"
|
||||||
#include "ardour/region_factory.h"
|
#include "ardour/region_factory.h"
|
||||||
#include "ardour/session.h"
|
#include "ardour/session.h"
|
||||||
#include "ardour/smf_source.h"
|
#include "ardour/smf_source.h"
|
||||||
|
|
@ -156,6 +157,11 @@ MidiStreamView::add_region_view_internal (boost::shared_ptr<Region> r, bool wfd,
|
||||||
/* display events and find note range */
|
/* display events and find note range */
|
||||||
display_region (region_view, wfd);
|
display_region (region_view, wfd);
|
||||||
|
|
||||||
|
/* fit note range if we are importing */
|
||||||
|
if (_trackview.session()->operation_in_progress (Operations::insert_file)) {
|
||||||
|
set_note_range (ContentsRange);
|
||||||
|
}
|
||||||
|
|
||||||
/* catch regionview going away */
|
/* catch regionview going away */
|
||||||
region->DropReferences.connect (*this, invalidator (*this), boost::bind (&MidiStreamView::remove_region_view, this, region), gui_context());
|
region->DropReferences.connect (*this, invalidator (*this), boost::bind (&MidiStreamView::remove_region_view, this, region), gui_context());
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue