copyFrom angepasst

This commit is contained in:
ngb
2022-07-31 10:02:11 +02:00
parent 70c607f2e8
commit fcb536ff96
2 changed files with 4 additions and 4 deletions

View File

@@ -325,8 +325,8 @@ public abstract class Shape extends BasicDrawable {
setStrokeWeight(shape.getStrokeWeight()); setStrokeWeight(shape.getStrokeWeight());
setStrokeType(shape.getStrokeType()); setStrokeType(shape.getStrokeType());
visible = shape.isVisible(); visible = shape.isVisible();
rotation = shape.rotation; rotation = shape.getRotation();
scale(shape.scale); scale(shape.getScale());
setAnchor(shape.getAnchor()); setAnchor(shape.getAnchor());
} }
} }

View File

@@ -181,13 +181,13 @@ public class Text extends Shape {
@Override @Override
public void copyFrom( Shape shape ) { public void copyFrom( Shape shape ) {
super.copyFrom(shape);
if( shape instanceof Text ) { if( shape instanceof Text ) {
Text pText = (Text) shape; Text pText = (Text) shape;
this.text = pText.getText(); this.text = pText.getText();
this.font = pText.getFont(); this.font = pText.getFont();
calculateBounds();
} }
super.copyFrom(shape);
calculateBounds();
} }
@Override @Override