Skip to content

Commit f6ca211

Browse files
committed
GeneratePrimaryStatsData: Fix crash on phase name change. Fix sanity check of mu value
Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
1 parent 81e4283 commit f6ca211

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Source/Plugins/SyntheticBuilding/SyntheticBuildingFilters/GeneratePrimaryStatsData.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ void GeneratePrimaryStatsData::dataCheck()
216216
setErrorCondition(0);
217217
setWarningCondition(0);
218218

219-
FLOAT_RANGE_CHECK(Mu, 0.0001, 10.0, -95000);
219+
FLOAT_RANGE_CHECK(Mu, -10.0, 10.0, -95000);
220220
FLOAT_RANGE_CHECK(Sigma, 0.0, 5.0, -95001);
221221
FLOAT_RANGE_CHECK(MinCutOff, 0, 1000000, -95002)
222222
FLOAT_RANGE_CHECK(MaxCutOff, 0, 1000000, -95003)
@@ -270,7 +270,10 @@ void GeneratePrimaryStatsData::dataCheck()
270270
m_PhaseNames = phaseNames.get();
271271

272272
setPhaseIndex(1); // If we are creating the StatsDataArray then we are the first phase
273-
phaseNames->setValue(m_PhaseIndex, m_PhaseName);
273+
if(!getInPreflight())
274+
{
275+
phaseNames->setValue(m_PhaseIndex, m_PhaseName);
276+
}
274277
}
275278

276279
// User wants to Append to existing AttributeMatrix
@@ -332,7 +335,10 @@ void GeneratePrimaryStatsData::dataCheck()
332335
m_PhaseNames = phaseNames.get();
333336

334337
setPhaseIndex(tDims[0] - 1); // If we are creating the StatsDataArray then we are the first phase
335-
phaseNames->setValue(m_PhaseIndex, m_PhaseName);
338+
if(!getInPreflight())
339+
{
340+
phaseNames->setValue(m_PhaseIndex, m_PhaseName);
341+
}
336342
}
337343

338344
// If all goes well, then calculate the number of bins to display back on the user interface.

0 commit comments

Comments
 (0)