Ignore empty simulations in sim table export
This commit is contained in:
parent
14db274d42
commit
1b7213e21f
@ -459,7 +459,7 @@ public class Simulation implements ChangeSource, Cloneable {
|
||||
/**
|
||||
* Return true if this simulation contains plottable flight data.
|
||||
*
|
||||
* @return
|
||||
* @return true if this simulation contains plottable flight data.
|
||||
*/
|
||||
public boolean hasSimulationData() {
|
||||
FlightData data = getSimulatedData();
|
||||
@ -472,6 +472,15 @@ public class Simulation implements ChangeSource, Cloneable {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if this simulation contains summary flight data.
|
||||
* @return true if this simulation contains summary flight data.
|
||||
*/
|
||||
public boolean hasSummaryData() {
|
||||
FlightData data = getSimulatedData();
|
||||
return data != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a copy of this simulation suitable for cut/copy/paste operations.
|
||||
* The rocket refers to the same instance as the original simulation.
|
||||
|
@ -118,6 +118,11 @@ public class SimulationTableCSVExport {
|
||||
// Account for sorting... resulting CSV file will be in the same order as shown in the table thanks to this gem.
|
||||
int idx = simulationTable.convertRowIndexToModel(i);
|
||||
|
||||
// Ignore empty simulation
|
||||
if (!document.getSimulation(idx).hasSummaryData()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
int nullCnt = 0;
|
||||
rowColumnElement.clear();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user