From e44dd7d5542d3ea992a336db026e4d586f51f1cb Mon Sep 17 00:00:00 2001 From: Matthias Neeracher Date: Sat, 24 Sep 2011 21:01:48 +0200 Subject: [PATCH] Fix calculation of property indices on deletion --- Sources/VLModel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/VLModel.cpp b/Sources/VLModel.cpp index 1c1e2c3..1926ed1 100644 --- a/Sources/VLModel.cpp +++ b/Sources/VLModel.cpp @@ -2038,7 +2038,7 @@ void VLSong::DeleteMeasures(size_t beginMeasure, size_t endMeasure, int mode) if (beginMeasure && fMeasures[beginMeasure-1].fPropIdx == firstProp) ++firstProp; - if (endMeasure < CountMeasures() && fMeasures[endMeasure].fPropIdx == lastProp) + if (endMeasure < CountMeasures() && fMeasures[endMeasure].fPropIdx == lastProp-1) --lastProp; if (lastProp - firstProp == fProperties.size()) ++firstProp;