summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/midi_time_axis.cc3
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/scroomer.h2
-rw-r--r--libs/gtkmm2ext/scroomer.cc4
3 files changed, 9 insertions, 0 deletions
diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc
index af1e7b61c7..87d453c1d7 100644
--- a/gtk2_ardour/midi_time_axis.cc
+++ b/gtk2_ardour/midi_time_axis.cc
@@ -128,6 +128,9 @@ MidiTimeAxisView::set_route (boost::shared_ptr<Route> rt)
if (is_track ()) {
_piano_roll_header = new PianoRollHeader(*midi_view());
_range_scroomer = new MidiScroomer(midi_view()->note_range_adjustment);
+ _range_scroomer->DoubleClicked.connect (sigc::bind (
+ sigc::mem_fun(*this, &MidiTimeAxisView::set_note_range),
+ MidiStreamView::ContentsRange, false));
}
/* This next call will result in our height being set up, so it must come after
diff --git a/libs/gtkmm2ext/gtkmm2ext/scroomer.h b/libs/gtkmm2ext/gtkmm2ext/scroomer.h
index b5c93f7f9f..a5b7f4a9ba 100644
--- a/libs/gtkmm2ext/gtkmm2ext/scroomer.h
+++ b/libs/gtkmm2ext/gtkmm2ext/scroomer.h
@@ -60,6 +60,8 @@ public:
sigc::signal0<void> DragStarting;
sigc::signal0<void> DragFinishing;
+ sigc::signal0<void> DoubleClicked;
+
protected:
Gtk::Adjustment& adj;
diff --git a/libs/gtkmm2ext/scroomer.cc b/libs/gtkmm2ext/scroomer.cc
index dcef6eae33..6e27f5ce0a 100644
--- a/libs/gtkmm2ext/scroomer.cc
+++ b/libs/gtkmm2ext/scroomer.cc
@@ -251,6 +251,10 @@ Scroomer::on_button_press_event (GdkEventButton* ev)
DragStarting (); /* EMIT SIGNAL */
}
+ if (ev->type == GDK_2BUTTON_PRESS && ev->button == 1) {
+ DoubleClicked();
+ }
+
return false;
}