diff --git a/gtk2_ardour/midi_view.cc b/gtk2_ardour/midi_view.cc index f893b19e91..007f97a1dc 100644 --- a/gtk2_ardour/midi_view.cc +++ b/gtk2_ardour/midi_view.cc @@ -1734,9 +1734,11 @@ MidiView::extend_active_notes (timecnt_t const & duration) return; } + double x1 = _editing_context.duration_to_pixels (duration); + for (int i = 0; i < 128; ++i) { if (_active_notes[i]) { - _active_notes[i]->set_x1 (_editing_context.duration_to_pixels (duration)); + _active_notes[i]->set_x1 (x1); } } }