Skip to content

Commit

Permalink
Refs #9070 Add range checking to FuryFit interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Jackson committed Feb 24, 2014
1 parent e8f39c6 commit 9cc5fb5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Code/Mantid/MantidQt/CustomInterfaces/src/FuryFit.cpp
Expand Up @@ -486,6 +486,20 @@ namespace IDA
}

int specNo = uiForm().furyfit_leSpecNo->text().toInt();
int nHist = static_cast<int>(m_ffInputWS->getNumberHistograms());

if( specNo < 0 || specNo >= nHist )
{
if (specNo < 0)
{
specNo = 0;
}
else
{
specNo = nHist-1;
}
uiForm().furyfit_leSpecNo->setText(QString::number(specNo));
}

m_ffDataCurve = plotMiniplot(m_ffPlot, m_ffDataCurve, m_ffInputWS, specNo);
try
Expand Down

0 comments on commit 9cc5fb5

Please sign in to comment.