From 6fcf53935e1d4fb674959a8e05765eb29d633ef8 Mon Sep 17 00:00:00 2001 From: Matthias Neeracher Date: Mon, 26 Sep 2011 04:50:24 +0200 Subject: [PATCH] Fix accidentals on transposition --- Sources/VLModel.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sources/VLModel.cpp b/Sources/VLModel.cpp index 415874b..26efeeb 100644 --- a/Sources/VLModel.cpp +++ b/Sources/VLModel.cpp @@ -972,6 +972,8 @@ void VLSong::ChangeKey(int section, int newKey, int newMode, bool transpose) FlipAccidentals(i->fVisual); FlipAccidentals(i->fRootAccidental); } + i->fVisual = VLPitchAccidental(i->fPitch, i->fVisual, newKey); + i->fRootAccidental = VLPitchAccidental(i->fRootPitch, i->fRootAccidental, newKey); } } for (int pass=0; pass<2 && semi;) { @@ -990,6 +992,7 @@ void VLSong::ChangeKey(int section, int newKey, int newMode, bool transpose) i->fPitch += semi; if (flipAcc) FlipAccidentals(i->fVisual); + i->fVisual = VLPitchAccidental(i->fPitch, i->fVisual, newKey); low = std::min(low, i->fPitch); high = std::max(high, i->fPitch); }