diff --git a/src/ChangeLog b/src/ChangeLog index f09bb04cc..736e8a7cc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,5 @@ +26.04.2024 + - Fix issue 1104: Fixed update of UI element for globalPitchShift upon loading song (rj) 11.12.2023 - Shortcuts: Forum request: Added editor scroll up/down, fast up/down + left/right. (Tim) 25.09.2023 diff --git a/src/muse/arranger/arranger.cpp b/src/muse/arranger/arranger.cpp index c375f1ad9..fe4b2291b 100644 --- a/src/muse/arranger/arranger.cpp +++ b/src/muse/arranger/arranger.cpp @@ -848,6 +848,12 @@ void Arranger::songChanged(MusECore::SongChangedStruct_t type) if (type & SC_TEMPO) setGlobalTempo(MusEGlobal::tempomap.globalTempo()); + if (type & SC_KEY) { + // hijacking this update type as it's sort of related... + // when a song is loaded we need to update the pitch spinbox + globalPitchSpinBox->setValue(MusEGlobal::song->globalPitchShift()); + } + if (type & SC_DIVISION_CHANGED) { // The division has changed. The raster table and raster model will have been @@ -870,8 +876,9 @@ void Arranger::songChanged(MusECore::SongChangedStruct_t type) if(type & (SC_PART_INSERTED | SC_PART_REMOVED | SC_PART_MODIFIED | SC_EVENT_INSERTED | SC_EVENT_REMOVED | SC_EVENT_MODIFIED | SC_CLIP_MODIFIED | SC_MARKER_INSERTED | SC_MARKER_REMOVED | SC_MARKER_MODIFIED | - SC_AUDIO_CTRL_MOVE_MODE)) - canvas->redraw(); + SC_AUDIO_CTRL_MOVE_MODE)) { + canvas->redraw(); + } // We must marshall song changed instead of connecting to the strip's song changed // otherwise it crashes when loading another song because track is no longer valid