diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-08-03 19:22:57 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-08-03 19:22:57 +0000 |
commit | b1f5a6a68d0b62a61684b2c011a97de825256a59 (patch) | |
tree | 856af95d148d2c0b395fac1d3483159d54ee5253 /gtk2_ardour/midi_time_axis.cc | |
parent | bd69ec8b25e825e0bf6399e19e34e553189a0c28 (diff) |
a bunch of tweaks for the step entry process (computer keyboard input now works, for example)
git-svn-id: svn://localhost/ardour2/branches/3.0@7532 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/midi_time_axis.cc')
-rw-r--r-- | gtk2_ardour/midi_time_axis.cc | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc index 0287a1c0ea..098b96b5b2 100644 --- a/gtk2_ardour/midi_time_axis.cc +++ b/gtk2_ardour/midi_time_axis.cc @@ -116,6 +116,7 @@ MidiTimeAxisView::MidiTimeAxisView (PublicEditor& ed, Session* sess, , _midi_thru_item (0) , default_channel_menu (0) , controller_menu (0) + , step_editor (0) { subplugin_menu.set_name ("ArdourContextMenu"); @@ -924,16 +925,30 @@ MidiTimeAxisView::start_step_editing () midi_track()->set_step_editing (true); - StepEntry* se = new StepEntry (*this); + if (step_editor == 0) { + step_editor = new StepEntry (*this); + step_editor->signal_delete_event().connect (sigc::mem_fun (*this, &MidiTimeAxisView::step_editor_hidden)); + } - se->set_position (WIN_POS_MOUSE); - se->present (); + step_editor->set_position (WIN_POS_MOUSE); + step_editor->present (); +} + +bool +MidiTimeAxisView::step_editor_hidden (GdkEventAny*) +{ + stop_step_editing (); + return true; } void MidiTimeAxisView::stop_step_editing () { midi_track()->set_step_editing (false); + + if (step_editor) { + step_editor->hide (); + } } void |