Merge pull request #901 from JoePfeiffer/fix-motor-detail-plot

fix typo that called generateSeries() with thrust curve index instead…
This commit is contained in:
Joe Pfeiffer 2021-03-12 10:35:13 -07:00 committed by GitHub
commit 44e6856103
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,6 +76,8 @@ public class ThrustCurveMotorPlotDialog extends JDialog {
// Create the plot data set // Create the plot data set
XYSeriesCollection dataset = new XYSeriesCollection(); XYSeriesCollection dataset = new XYSeriesCollection();
// Add data series for selected curve first, so it will
// render "on top" of the other curves
// Selected thrust curve // Selected thrust curve
int n = 0; int n = 0;
if (selected >= 0) { if (selected >= 0) {
@ -91,7 +93,7 @@ public class ThrustCurveMotorPlotDialog extends JDialog {
continue; continue;
ThrustCurveMotor m = motors.get(i); ThrustCurveMotor m = motors.get(i);
dataset.addSeries(generateSeries(m, i)); dataset.addSeries(generateSeries(m, n));
renderer.setSeriesStroke(n, new BasicStroke(1.5f)); renderer.setSeriesStroke(n, new BasicStroke(1.5f));
renderer.setSeriesPaint(n, ThrustCurveMotorSelectionPanel.getColor(i)); renderer.setSeriesPaint(n, ThrustCurveMotorSelectionPanel.getColor(i));
renderer.setSeriesShape(n, new Rectangle()); renderer.setSeriesShape(n, new Rectangle());