mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-30 17:03:06 +01:00
track enter events on pianoroll to set current editing context
This commit is contained in:
parent
42bbd1afd5
commit
322d4e670c
3 changed files with 12 additions and 2 deletions
|
|
@ -95,6 +95,13 @@ Pianoroll::~Pianoroll ()
|
|||
delete bindings;
|
||||
}
|
||||
|
||||
bool
|
||||
Pianoroll::enter (GdkEventCrossing*)
|
||||
{
|
||||
switch_editing_context (this);
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
Pianoroll::load_bindings ()
|
||||
{
|
||||
|
|
@ -291,7 +298,9 @@ Pianoroll::build_upper_toolbar ()
|
|||
|
||||
Bindings* pr_bindings = Bindings::get_bindings (X_("Pianoroll"));
|
||||
_toolbox.set_data (X_("ardour-bindings"), pr_bindings);
|
||||
|
||||
_contents.add (_toolbox);
|
||||
_contents.signal_enter_notify_event().connect (sigc::mem_fun (*this, &Pianoroll::enter), false);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -281,4 +281,5 @@ class Pianoroll : public CueEditor
|
|||
std::pair<Temporal::timepos_t,Temporal::timepos_t> max_zoom_extent() const;
|
||||
|
||||
void point_selection_changed ();
|
||||
bool enter (GdkEventCrossing*);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ PianorollWindow::PianorollWindow (std::string const & name, Session& s)
|
|||
pianoroll->set_session (&s);
|
||||
pianoroll->viewport().set_size_request (600, 120);
|
||||
|
||||
add (pianoroll->toolbox());
|
||||
pianoroll->toolbox().show ();
|
||||
add (pianoroll->contents());
|
||||
pianoroll->contents().show ();
|
||||
}
|
||||
|
||||
PianorollWindow::~PianorollWindow ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue