mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-27 00:47:43 +01:00
catch hscroll in pianoroll appropriately
Some thought might be put into thinking about why/whether EditingContext ought to do this instead, since Editor does almost the same thing, but without using the horizontal_adjustment owned by EditingContext
This commit is contained in:
parent
e348607976
commit
130cfd2e08
2 changed files with 11 additions and 0 deletions
|
|
@ -265,9 +265,19 @@ Pianoroll::add_multi_controller_item (Gtk::Menu_Helpers::MenuList&,
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
Pianoroll::scrolled ()
|
||||
{
|
||||
pending_visual_change.add (VisualChange::TimeOrigin);
|
||||
pending_visual_change.time_origin = horizontal_adjustment.get_value() * samples_per_pixel;
|
||||
ensure_visual_change_idle_handler ();
|
||||
}
|
||||
|
||||
void
|
||||
Pianoroll::build_lower_toolbar ()
|
||||
{
|
||||
horizontal_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &Pianoroll::scrolled));
|
||||
|
||||
ArdourButton::Element elements = ArdourButton::Element (ArdourButton::Text|ArdourButton::Indicator|ArdourButton::Edge|ArdourButton::Body);
|
||||
|
||||
_canvas_hscrollbar = manage (new Gtk::HScrollbar (horizontal_adjustment));
|
||||
|
|
|
|||
|
|
@ -346,4 +346,5 @@ class Pianoroll : public CueEditor
|
|||
|
||||
bool bbt_ruler_event (GdkEvent*);
|
||||
void ruler_locate (GdkEventButton*);
|
||||
void scrolled ();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue