Skip to content

Commit

Permalink
Remove pointless check for textAxis pointer in FitMW.
Browse files Browse the repository at this point in the history
We know from our setup that it's what we will get.
Refs #7994
  • Loading branch information
martyngigg committed Sep 30, 2013
1 parent 0be6ab2 commit 888194f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Code/Mantid/Framework/CurveFitting/src/FitMW.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,8 @@ namespace
const size_t nhistograms = functionsToDisplay.size() + 2;
const size_t nyvalues = ivalues->size();
auto ws = createEmptyResultWS(nhistograms, nyvalues);
API::TextAxis *textAxis = dynamic_cast<API::TextAxis*>(ws->getAxis(1));
// The workspace was constructed with a TextAxis
API::TextAxis *textAxis = static_cast<API::TextAxis*>(ws->getAxis(1));
textAxis->setLabel(0,"Data");
textAxis->setLabel(1,"Calc");
textAxis->setLabel(2,"Diff");
Expand All @@ -314,7 +315,7 @@ namespace
size_t wsIndex(1); // Zero reserved for data
for(auto it = functionsToDisplay.begin(); it != iend; ++it)
{
if(textAxis && wsIndex > 2) textAxis->setLabel(wsIndex, (*it)->name());
if(wsIndex > 2) textAxis->setLabel(wsIndex, (*it)->name());
addFunctionValuesToWS(*it, ws, wsIndex, domain, values);
if(it == functionsToDisplay.begin()) wsIndex += 2; //Skip difference histogram for now
else ++wsIndex;
Expand Down

0 comments on commit 888194f

Please sign in to comment.