// Now we can remove the deleted curves, and update the existing ones
// Start from the end, to remove the entries and keep the index OK
for (int i=n-1; i>=0; i--) {
if (!toKeep[i]) {
GenericMapper mapper = (GenericMapper)mappers.remove(i);
if (mapper!=null) mapper.removeListener(BarChartShape.this);
DataSource source = (DataSource)mapperSources.remove(i);
if (source!=null) source.removeListener(BarChartShape.this);
dst.removeSource(i);
}
}