mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
Set up piano roll and scroomer objects before the MidiTimeAxisView height gets set up, so that their visibility can be initialised correctly. Fixes #4515.
git-svn-id: svn://localhost/ardour2/branches/3.0@10828 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
a33fe692e6
commit
1e97a0dcbe
1 changed files with 13 additions and 5 deletions
|
|
@ -124,11 +124,23 @@ MidiTimeAxisView::MidiTimeAxisView (PublicEditor& ed, Session* sess, Canvas& can
|
||||||
void
|
void
|
||||||
MidiTimeAxisView::set_route (boost::shared_ptr<Route> rt)
|
MidiTimeAxisView::set_route (boost::shared_ptr<Route> rt)
|
||||||
{
|
{
|
||||||
|
_route = rt;
|
||||||
|
|
||||||
|
_view = new MidiStreamView (*this);
|
||||||
|
|
||||||
|
if (is_track ()) {
|
||||||
|
_piano_roll_header = new PianoRollHeader(*midi_view());
|
||||||
|
_range_scroomer = new MidiScroomer(midi_view()->note_range_adjustment);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This next call will result in our height being set up, so it must come after
|
||||||
|
the creation of the piano roll / range scroomer as their visibility is set up
|
||||||
|
when our height is.
|
||||||
|
*/
|
||||||
RouteTimeAxisView::set_route (rt);
|
RouteTimeAxisView::set_route (rt);
|
||||||
|
|
||||||
subplugin_menu.set_name ("ArdourContextMenu");
|
subplugin_menu.set_name ("ArdourContextMenu");
|
||||||
|
|
||||||
_view = new MidiStreamView (*this);
|
|
||||||
if (!gui_property ("note-range-min").empty ()) {
|
if (!gui_property ("note-range-min").empty ()) {
|
||||||
midi_view()->apply_note_range (atoi (gui_property ("note-range-min").c_str()), atoi (gui_property ("note-range-max").c_str()), true);
|
midi_view()->apply_note_range (atoi (gui_property ("note-range-min").c_str()), atoi (gui_property ("note-range-max").c_str()), true);
|
||||||
}
|
}
|
||||||
|
|
@ -150,14 +162,10 @@ MidiTimeAxisView::set_route (boost::shared_ptr<Route> rt)
|
||||||
_route->processors_changed.connect (*this, invalidator (*this), ui_bind (&MidiTimeAxisView::processors_changed, this, _1), gui_context());
|
_route->processors_changed.connect (*this, invalidator (*this), ui_bind (&MidiTimeAxisView::processors_changed, this, _1), gui_context());
|
||||||
|
|
||||||
if (is_track()) {
|
if (is_track()) {
|
||||||
_piano_roll_header = new PianoRollHeader(*midi_view());
|
|
||||||
|
|
||||||
_piano_roll_header->AddNoteSelection.connect (sigc::mem_fun (*this, &MidiTimeAxisView::add_note_selection));
|
_piano_roll_header->AddNoteSelection.connect (sigc::mem_fun (*this, &MidiTimeAxisView::add_note_selection));
|
||||||
_piano_roll_header->ExtendNoteSelection.connect (sigc::mem_fun (*this, &MidiTimeAxisView::extend_note_selection));
|
_piano_roll_header->ExtendNoteSelection.connect (sigc::mem_fun (*this, &MidiTimeAxisView::extend_note_selection));
|
||||||
_piano_roll_header->ToggleNoteSelection.connect (sigc::mem_fun (*this, &MidiTimeAxisView::toggle_note_selection));
|
_piano_roll_header->ToggleNoteSelection.connect (sigc::mem_fun (*this, &MidiTimeAxisView::toggle_note_selection));
|
||||||
|
|
||||||
_range_scroomer = new MidiScroomer(midi_view()->note_range_adjustment);
|
|
||||||
|
|
||||||
/* Suspend updates of the StreamView during scroomer drags to speed things up */
|
/* Suspend updates of the StreamView during scroomer drags to speed things up */
|
||||||
_range_scroomer->DragStarting.connect (sigc::mem_fun (*midi_view(), &MidiStreamView::suspend_updates));
|
_range_scroomer->DragStarting.connect (sigc::mem_fun (*midi_view(), &MidiStreamView::suspend_updates));
|
||||||
_range_scroomer->DragFinishing.connect (sigc::mem_fun (*midi_view(), &MidiStreamView::resume_updates));
|
_range_scroomer->DragFinishing.connect (sigc::mem_fun (*midi_view(), &MidiStreamView::resume_updates));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue