Take account that new PlotProperties may contain the same objects as the
old one.
gitlab #86
protected void setPlotProperties(PlotProperties properties) {
if (currentProperties != null) {
for (IAxis axis : currentProperties.ranges)
- axis.dispose();
+ if (!properties.ranges.contains(axis))
+ axis.dispose();
for (IAxis axis : currentProperties.domains)
- axis.dispose();
+ if (!properties.domains.contains(axis))
+ axis.dispose();
for (IDataset dataset : currentProperties.datasets)
- dataset.dispose();
+ if (!properties.datasets.contains(dataset))
+ dataset.dispose();
}
this.currentProperties = properties;
}