Save position of MIDI scroomers (#4140).
git-svn-id: svn://localhost/ardour2/branches/3.0@9993 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
d5a55c48f9
commit
25b4913c78
@ -275,12 +275,6 @@ MidiStreamView::redisplay_track ()
|
||||
_data_note_max = 71;
|
||||
}
|
||||
|
||||
// Extend visible range to show newly recorded data, if necessary
|
||||
_lowest_note = std::min(_lowest_note, _data_note_min);
|
||||
_highest_note = std::max(_highest_note, _data_note_max);
|
||||
|
||||
veto_note_range(_lowest_note, _highest_note);
|
||||
|
||||
// Flag region views as invalid and disable drawing
|
||||
for (i = region_views.begin(); i != region_views.end(); ++i) {
|
||||
(*i)->set_valid(false);
|
||||
|
@ -127,6 +127,10 @@ MidiTimeAxisView::set_route (boost::shared_ptr<Route> rt)
|
||||
subplugin_menu.set_name ("ArdourContextMenu");
|
||||
|
||||
_view = new MidiStreamView (*this);
|
||||
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()->NoteRangeChanged.connect (sigc::mem_fun (*this, &MidiTimeAxisView::note_range_changed));
|
||||
|
||||
ignore_toggle = false;
|
||||
|
||||
@ -1163,3 +1167,10 @@ MidiTimeAxisView::get_channel_for_add () const
|
||||
|
||||
return channel;
|
||||
}
|
||||
|
||||
void
|
||||
MidiTimeAxisView::note_range_changed ()
|
||||
{
|
||||
set_gui_property ("note-range-min", (int) midi_view()->lowest_note ());
|
||||
set_gui_property ("note-range-max", (int) midi_view()->highest_note ());
|
||||
}
|
||||
|
@ -122,6 +122,7 @@ class MidiTimeAxisView : public RouteTimeAxisView
|
||||
void set_note_range(MidiStreamView::VisibleNoteRange range);
|
||||
|
||||
void route_active_changed ();
|
||||
void note_range_changed ();
|
||||
|
||||
bool _ignore_signals;
|
||||
MidiScroomer* _range_scroomer;
|
||||
|
Loading…
Reference in New Issue
Block a user