From db89647676ef4db66bf616d7bb8e67e6dedac174 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 10 Jan 2024 15:16:39 -0700 Subject: [PATCH] revert scope change for a local variable --- gtk2_ardour/midi_view.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/midi_view.cc b/gtk2_ardour/midi_view.cc index 2fe194dcf6..052f6e0867 100644 --- a/gtk2_ardour/midi_view.cc +++ b/gtk2_ardour/midi_view.cc @@ -1599,7 +1599,7 @@ MidiView::update_sustained (Note* ev, bool update_ghost_regions) const double y0 = 1 + floor(note_to_y(note->note())); double y1; - samplepos_t note_end_samples; + if (note->length() == Temporal::Beats()) { /* special case actual zero-length notes */ @@ -1616,7 +1616,7 @@ MidiView::update_sustained (Note* ev, bool update_ghost_regions) note_end = timepos_t (source_end); } - note_end_samples = _midi_region->position().distance ((session_source_start + note_end)).samples(); + const samplepos_t note_end_samples = _midi_region->position().distance ((session_source_start + note_end)).samples(); x1 = std::max(1., _editing_context.sample_to_pixel (note_end_samples));