From 015890f16cd18e139e069d5f887142a94e35a0d3 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 13 Nov 2025 17:08:31 -0700 Subject: [PATCH] slight optimization for MidiView::extend_active_notes() --- gtk2_ardour/midi_view.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); } } }