Skip to content
Snippets Groups Projects
Commit 374b80ea authored by Yurov, Dmitry's avatar Yurov, Dmitry
Browse files

Limit fittability check to instrument scope

Redmine: #1981
parent 6a0f411b
No related branches found
No related tags found
No related merge requests found
......@@ -81,6 +81,12 @@ void ParameterItem::restoreFromBackup()
bool ParameterItem::isFittable() const
{
static const QStringList application_scope {
Constants::GISASInstrumentType,
Constants::OffSpecInstrumentType,
Constants::SpecularInstrumentType
};
static const QStringList fitting_black_list {
// distribution types
Constants::DistributionGateType,
......@@ -115,9 +121,16 @@ bool ParameterItem::isFittable() const
const QString& par_path = FitParameterHelper::getParameterItemPath(this);
for (const auto& name : fitting_black_list)
bool is_in_scope = false;
for (const auto& name : application_scope)
if (par_path.contains(name))
return false;
is_in_scope = true;
if (is_in_scope) {
for (const auto& name : fitting_black_list)
if (par_path.contains(name))
return false;
}
return true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment