summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2016-11-25 00:50:29 +1100
committernick_m <mainsbridge@gmail.com>2016-11-25 00:50:29 +1100
commit2ec2c1c0178ca0b6be35855bdb830b0289aa7b9d (patch)
treeb4c78029998428d65ef4f282dbcdaa8b54d2b683 /gtk2_ardour
parent910cbc600cb11f0554b277cf761811ccf58443a8 (diff)
midi scroomer updates streamview during drags.
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/midi_time_axis.cc20
-rw-r--r--gtk2_ardour/midi_time_axis.h4
2 files changed, 19 insertions, 5 deletions
diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc
index 4e4b541977..0ff084e4f1 100644
--- a/gtk2_ardour/midi_time_axis.cc
+++ b/gtk2_ardour/midi_time_axis.cc
@@ -163,8 +163,6 @@ MidiTimeAxisView::set_route (boost::shared_ptr<Route> rt)
true);
}
- midi_view()->NoteRangeChanged.connect (
- sigc::mem_fun (*this, &MidiTimeAxisView::note_range_changed));
_view->ContentsHeightChanged.connect (
sigc::mem_fun (*this, &MidiTimeAxisView::contents_height_changed));
@@ -207,11 +205,12 @@ MidiTimeAxisView::set_route (boost::shared_ptr<Route> rt)
_piano_roll_header->ToggleNoteSelection.connect (
sigc::mem_fun (*this, &MidiTimeAxisView::toggle_note_selection));
- /* Suspend updates of the StreamView during scroomer drags to speed things up */
+ /* Update StreamView during scroomer drags.*/
+
_range_scroomer->DragStarting.connect (
- sigc::mem_fun (*midi_view(), &MidiStreamView::suspend_updates));
+ sigc::mem_fun (*this, &MidiTimeAxisView::start_scroomer_update));
_range_scroomer->DragFinishing.connect (
- sigc::mem_fun (*midi_view(), &MidiStreamView::resume_updates));
+ sigc::mem_fun (*this, &MidiTimeAxisView::stop_scroomer_update));
/* Put the scroomer and the keyboard in a VBox with a padding
label so that they can be reduced in height for stacked-view
@@ -431,6 +430,17 @@ MidiTimeAxisView::drop_instrument_ref ()
{
midnam_connection.drop_connections ();
}
+void
+MidiTimeAxisView::start_scroomer_update ()
+{
+ _note_range_changed_connection = midi_view()->NoteRangeChanged.connect (
+ sigc::mem_fun (*this, &MidiTimeAxisView::note_range_changed));
+}
+void
+MidiTimeAxisView::stop_scroomer_update ()
+{
+ _note_range_changed_connection.disconnect();
+}
void
MidiTimeAxisView::update_patch_selector ()
diff --git a/gtk2_ardour/midi_time_axis.h b/gtk2_ardour/midi_time_axis.h
index fe8a464875..9f3ef78e5b 100644
--- a/gtk2_ardour/midi_time_axis.h
+++ b/gtk2_ardour/midi_time_axis.h
@@ -123,6 +123,10 @@ private:
void drop_instrument_ref ();
PBD::ScopedConnectionList midnam_connection;
+ void start_scroomer_update ();
+ void stop_scroomer_update ();
+ sigc::connection _note_range_changed_connection;
+
void model_changed(const std::string& model);
void custom_device_mode_changed(const std::string& mode);