Don't use setThickness or setFilled from the loadFromPreset since these have side effects of clearing the preset.

This commit is contained in:
Kevin Ruland 2012-04-12 16:50:18 +00:00
parent b850d6615f
commit 3a2145e9de

View File

@ -149,11 +149,11 @@ public abstract class SymmetricComponent extends BodyComponent implements Radial
@Override
protected void loadFromPreset(ComponentPreset preset) {
if ( preset.has(ComponentPreset.THICKNESS) ) {
this.setThickness(preset.get(ComponentPreset.THICKNESS));
this.thickness = preset.get(ComponentPreset.THICKNESS);
this.filled = false;
}
if ( preset.has(ComponentPreset.FILLED)) {
// FIXME - this doesn't seem to work for nose cones.
this.setFilled(preset.get(ComponentPreset.FILLED));
this.filled = true;
}
super.loadFromPreset(preset);