Fix calculation of property indices on deletion

This commit is contained in:
Matthias Neeracher 2011-09-24 21:01:48 +02:00
parent 864f07848c
commit e44dd7d554

View File

@ -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;