summaryrefslogtreecommitdiff
path: root/gtk2_ardour/midi_time_axis.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-02-12 12:29:20 +0000
committerCarl Hetherington <carl@carlh.net>2011-02-12 12:29:20 +0000
commit27cbe72d969e16a16dd60c4d86c018a2d2cec78f (patch)
tree8a3921fc58a09b59aafd19f0c4b122362efe38ec /gtk2_ardour/midi_time_axis.cc
parente8e0da71a0cba9f3204fade27e324603dc71c610 (diff)
Remove dependence on the order of calls of listeners to MidiTrack::StepEditStatusChange, and rename the step entry menu item to make it consistent with the dialogue title. Should fix #3765.
git-svn-id: svn://localhost/ardour2/branches/3.0@8831 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/midi_time_axis.cc')
-rw-r--r--gtk2_ardour/midi_time_axis.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc
index 41c85a193d..23d4adb104 100644
--- a/gtk2_ardour/midi_time_axis.cc
+++ b/gtk2_ardour/midi_time_axis.cc
@@ -247,6 +247,7 @@ MidiTimeAxisView::~MidiTimeAxisView ()
void
MidiTimeAxisView::check_step_edit ()
{
+ ensure_step_editor ();
_step_editor->check_step_edit ();
}
@@ -1054,13 +1055,18 @@ MidiTimeAxisView::add_region (framepos_t pos, framecnt_t length, bool commit)
return boost::dynamic_pointer_cast<MidiRegion>(region);
}
+void
+MidiTimeAxisView::ensure_step_editor ()
+{
+ if (!_step_editor) {
+ _step_editor = new StepEditor (_editor, midi_track(), *this);
+ }
+}
+
void
MidiTimeAxisView::start_step_editing ()
{
- if (!_step_editor) {
- _step_editor = new StepEditor (_editor, midi_track(), *this);
- }
-
+ ensure_step_editor ();
_step_editor->start_step_editing ();
}