Remove unnecessary override of updateFigure in RocketFigure

Previously, updateFigure was overridden in RocketFigure in order to
ensure that all component shapes were added to the rocket prior to
calling the paintComponent method. This is superfluous as the
paintComponent method already adds the shapes prior to rendering.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
This commit is contained in:
Billy Olsen 2020-03-24 20:01:05 -07:00
parent 5977bfa95a
commit d98e2cb6f8

View File

@ -315,12 +315,6 @@ public class RocketFigure extends AbstractScaleFigure {
} }
@Override
public void updateFigure() {
updateShapes(this.figureShapes);
super.updateFigure();
}
public RocketComponent[] getComponentsByPoint(double x, double y) { public RocketComponent[] getComponentsByPoint(double x, double y) {
// Calculate point in shapes' coordinates // Calculate point in shapes' coordinates
Point2D.Double p = new Point2D.Double(x, y); Point2D.Double p = new Point2D.Double(x, y);