ensure a locally scoped tempo map in MidiView::{model,view}_changed()

This commit is contained in:
Paul Davis 2025-10-20 14:52:36 -06:00
parent d681c2d42c
commit cab3d96a4c

View file

@ -1117,6 +1117,8 @@ MidiView::model_changed()
return; return;
} }
EC_LOCAL_TEMPO_SCOPE_ARG (_editing_context);
MidiViewBackground::NoteRangeSuspender nrs (_midi_context); MidiViewBackground::NoteRangeSuspender nrs (_midi_context);
if (_active_notes) { if (_active_notes) {
@ -1280,6 +1282,9 @@ MidiView::view_changed()
} }
if (_active_notes) { if (_active_notes) {
EC_LOCAL_TEMPO_SCOPE_ARG (_editing_context);
for (auto & [ note, gui ] : _events) { for (auto & [ note, gui ] : _events) {
if (note->end_time() != std::numeric_limits<Temporal::Beats>::max()) { if (note->end_time() != std::numeric_limits<Temporal::Beats>::max()) {
update_note (gui); update_note (gui);
@ -1292,6 +1297,8 @@ MidiView::view_changed()
return; return;
} }
EC_LOCAL_TEMPO_SCOPE_ARG (_editing_context);
for (auto & [ note, gui] : _events) { for (auto & [ note, gui] : _events) {
bool visible; bool visible;