From df38b95ea7fafb000991db58ff517d3f6585e3ec Mon Sep 17 00:00:00 2001 From: JoePfeiffer Date: Wed, 10 Mar 2021 09:28:22 -0700 Subject: [PATCH] fix typo that called generateSeries() with thrust curve index instead of plot index. Also added comment explaining necessity of really awkward coding --- .../motor/thrustcurve/ThrustCurveMotorPlotDialog.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/swing/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/ThrustCurveMotorPlotDialog.java b/swing/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/ThrustCurveMotorPlotDialog.java index e5099a8ea..8c126e39b 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/ThrustCurveMotorPlotDialog.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/ThrustCurveMotorPlotDialog.java @@ -75,7 +75,9 @@ public class ThrustCurveMotorPlotDialog extends JDialog { // Create the plot data set XYSeriesCollection dataset = new XYSeriesCollection(); - + + // Add data series for selected curve first, so it will + // render "on top" of the other curves // Selected thrust curve int n = 0; if (selected >= 0) { @@ -91,7 +93,7 @@ public class ThrustCurveMotorPlotDialog extends JDialog { continue; ThrustCurveMotor m = motors.get(i); - dataset.addSeries(generateSeries(m, i)); + dataset.addSeries(generateSeries(m, n)); renderer.setSeriesStroke(n, new BasicStroke(1.5f)); renderer.setSeriesPaint(n, ThrustCurveMotorSelectionPanel.getColor(i)); renderer.setSeriesShape(n, new Rectangle());