Skip to content

Commit

Permalink
Refs #4383.Split Fit Browser into Muon Categories for muon interface.
Browse files Browse the repository at this point in the history
Making FitPropertyBrowser specialised is a separate ticket #3803.
  • Loading branch information
Robert-Whitley committed Feb 28, 2012
1 parent a79063b commit 954f35b
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion Code/Mantid/MantidQt/MantidWidgets/src/FitPropertyBrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1270,9 +1270,25 @@ void FitPropertyBrowser::populateFunctionNames()
std::string fnName = names[i];
QString qfnName = QString::fromStdString(fnName);
if (qfnName == "MultiBG") continue;
m_registeredFunctions << qfnName;

boost::shared_ptr<Mantid::API::IFitFunction> f = boost::shared_ptr<Mantid::API::IFitFunction>(
Mantid::API::FunctionFactory::Instance().createFitFunction(fnName));
if (!m_customFittings)
m_registeredFunctions << qfnName;
else
{
const std::vector<std::string> categories = f->categories();
bool muon = false;
for (size_t j=0; j<categories.size(); ++j)
{
if (categories[j] == "Muon")
muon = true;
}
if (muon == true)
{
m_registeredFunctions << qfnName;
}
}
Mantid::API::IPeakFunction* pf = dynamic_cast<Mantid::API::IPeakFunction*>(f.get());
//Mantid::API::CompositeFunction* cf = dynamic_cast<Mantid::API::CompositeFunction*>(f.get());
if (pf)
Expand Down

0 comments on commit 954f35b

Please sign in to comment.