summaryrefslogtreecommitdiff
path: root/gtk2_ardour/midi_time_axis.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-08-11 19:11:14 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-08-11 19:11:14 +0000
commitafd5b2002a796a85b7e5c1644581aaaa41de0fb8 (patch)
tree80a8e80459d4a51b0fcef4188a11be4009a55788 /gtk2_ardour/midi_time_axis.cc
parent5182f0770cca50cbb7c8fe419b2e64af02525553 (diff)
vari-size rect as step-edit cursor
git-svn-id: svn://localhost/ardour2/branches/3.0@7599 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/midi_time_axis.cc')
-rw-r--r--gtk2_ardour/midi_time_axis.cc17
1 files changed, 13 insertions, 4 deletions
diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc
index 00b542fd13..1ddf309cce 100644
--- a/gtk2_ardour/midi_time_axis.cc
+++ b/gtk2_ardour/midi_time_axis.cc
@@ -912,15 +912,16 @@ MidiTimeAxisView::start_step_editing ()
step_edit_region_view = dynamic_cast<MidiRegionView*>(rv);
}
- if (step_edit_region_view) {
- step_edit_region_view->show_step_edit_cursor (0.0);
- }
-
if (step_editor == 0) {
step_editor = new StepEntry (*this);
step_editor->signal_delete_event().connect (sigc::mem_fun (*this, &MidiTimeAxisView::step_editor_hidden));
}
+ if (step_edit_region_view) {
+ step_edit_region_view->show_step_edit_cursor (0.0);
+ step_edit_region_view->set_step_edit_cursor_width (step_editor->note_length());
+ }
+
step_editor->set_position (WIN_POS_MOUSE);
step_editor->present ();
}
@@ -1048,6 +1049,14 @@ MidiTimeAxisView::step_add_note (uint8_t channel, uint8_t pitch, uint8_t velocit
return 0;
}
+void
+MidiTimeAxisView::set_step_edit_cursor_width (Evoral::MusicalTime beats)
+{
+ if (step_edit_region_view) {
+ step_edit_region_view->set_step_edit_cursor_width (beats);
+ }
+}
+
bool
MidiTimeAxisView::step_edit_within_triplet() const
{