Bug in SourceAndConverterHelper.cloneConverter()
Closed this issue · 4 comments
tischi commented
SourceAndConverterHelper.cloneConverter()
if ((converter instanceof ColorConverter)&&(cvt instanceof ColorConverter)) {
((ColorConverter) cvt).setColor(((ColorConverter)converter).getColor());
}
if ((converter instanceof RealARGBColorConverter)&&(cvt instanceof RealARGBColorConverter)) {
((RealARGBColorConverter)cvt).setMin(((RealARGBColorConverter)converter).getMin());
((RealARGBColorConverter)cvt).setMax(((RealARGBColorConverter)converter).getMax());
}
We do not need the second if statement, because already ColorConverter
implements LinearRange
which has setMin
and setMax
.
OK If I change this?
tischi commented
So it would be:
SourceAndConverterHelper.cloneConverter()
if ((converter instanceof ColorConverter)&&(cvt instanceof ColorConverter)) {
((ColorConverter) cvt).setColor(((ColorConverter)converter).getColor());
((ColorConverter) cvt).setMin(((ColorConverter)converter).getMin());
((ColorConverter) cvt).setMax(((ColorConverter)converter).getMax());
}
NicoKiaru commented
Ah, ok, sure!
tischi commented
@NicoKiaru Did you see the PR?
NicoKiaru commented
Merged. It 's present in version 0.4.2.