Skip to content

Commit

Permalink
Refs #5121 Update setting ties to actually work.
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Jackson committed Apr 1, 2014
1 parent f26fe4b commit e0a1aaf
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions Code/Mantid/MantidQt/CustomInterfaces/src/FuryFit.cpp
Expand Up @@ -309,26 +309,21 @@ namespace IDA
Mantid::API::IFunction::Attribute att(formula);
result->setAttribute("Formula", att);

result->setParameter("Intensity", m_ffDblMng->value(m_ffProp[name+".Intensity"]));

if ( tie || ! m_ffProp[name+".Intensity"]->subProperties().isEmpty() )
{
result->tie("Intensity", m_ffProp[name+".Intensity"]->valueText().toStdString());
}
result->setParameter("Tau", m_ffDblMng->value(m_ffProp[name+".Tau"]));
if ( tie || ! m_ffProp[name+".Tau"]->subProperties().isEmpty() )
{
result->tie("Tau", m_ffProp[name+".Tau"]->valueText().toStdString());
}
if ( name.startsWith("Str") )
QList<QtProperty*> props = m_ffProp[name]->subProperties();
for ( int i = 0; i < props.size(); i++ )
{
result->setParameter("Beta", m_ffDblMng->value(m_ffProp[name+".Beta"]));
if ( tie || ! m_ffProp[name+".Beta"]->subProperties().isEmpty() )
std::string name = props[i]->propertyName().toStdString();
result->setParameter(name, m_ffDblMng->value(props[i]));

//add tie if parameter is fixed
if ( tie || ! props[i]->subProperties().isEmpty() )
{
result->tie("Beta", m_ffProp[name+".Beta"]->valueText().toStdString());
std::string value = props[i]->valueText().toStdString();
result->tie(name, value);
}
}


result->applyTies();
return result;
}

Expand Down

0 comments on commit e0a1aaf

Please sign in to comment.