track enter events on pianoroll to set current editing context
This commit is contained in:
@@ -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 ()
|
||||
|
||||
Reference in New Issue
Block a user