implement double click to ContentsRange on MidiScroomer

git-svn-id: svn://localhost/ardour2/branches/3.0@13284 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Hans Baier 2012-10-16 09:19:19 +00:00
parent cb84e71caa
commit 4c9fcd407c
3 changed files with 9 additions and 0 deletions

View File

@ -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

View File

@ -60,6 +60,8 @@ public:
sigc::signal0<void> DragStarting;
sigc::signal0<void> DragFinishing;
sigc::signal0<void> DoubleClicked;
protected:
Gtk::Adjustment& adj;

View File

@ -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;
}