the return of double-click on scroomer zooms to data-based note range
This commit is contained in:
parent
e52d9a41da
commit
d1caa2401f
|
@ -113,6 +113,8 @@ public:
|
|||
void get_per_region_note_selection (std::list<std::pair<PBD::ID, std::set<std::shared_ptr<Evoral::Note<Temporal::Beats> > > > >&);
|
||||
void use_midnam_info ();
|
||||
|
||||
void set_note_range (MidiStreamView::VisibleNoteRange range, bool apply_to_selection = false);
|
||||
|
||||
protected:
|
||||
void start_step_editing ();
|
||||
void stop_step_editing ();
|
||||
|
@ -138,7 +140,6 @@ private:
|
|||
|
||||
void set_note_mode (ARDOUR::NoteMode mode, bool apply_to_selection = false);
|
||||
void set_color_mode (ARDOUR::ColorMode, bool force = false, bool redisplay = true, bool apply_to_selection = false);
|
||||
void set_note_range (MidiStreamView::VisibleNoteRange range, bool apply_to_selection = false);
|
||||
void route_active_changed ();
|
||||
void note_range_changed ();
|
||||
void parameter_changed (std::string const &);
|
||||
|
|
|
@ -634,13 +634,24 @@ bool
|
|||
PianoRollHeader::on_button_press_event (GdkEventButton* ev)
|
||||
{
|
||||
_scroomer_button_state = _scroomer_state;
|
||||
|
||||
if (ev->button == 1 && ev->x <= _scroomer_size){
|
||||
|
||||
if (ev->type == GDK_2BUTTON_PRESS) {
|
||||
MidiTimeAxisView* mtv = dynamic_cast<MidiTimeAxisView*>(&_view.trackview());
|
||||
if (mtv) {
|
||||
mtv->set_note_range (MidiStreamView::ContentsRange, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
_scroomer_drag = true;
|
||||
_old_y = ev->y;
|
||||
_fract = _adj.get_value();
|
||||
_fract_top = _adj.get_value() + _adj.get_page_size();
|
||||
return true;
|
||||
}else {
|
||||
|
||||
} else {
|
||||
int note = _view.y_to_note(ev->y);
|
||||
bool tertiary = Keyboard::modifier_state_contains (ev->state, Keyboard::TertiaryModifier);
|
||||
|
||||
|
|
Loading…
Reference in New Issue