Skip to content
Snippets Groups Projects
Commit 71ebb013 authored by Mikhail Svechnikov's avatar Mikhail Svechnikov
Browse files

[link_specular] Fix linking data to specular instrument (#544) ()

Merging branch 'link_specular'  into 'r20.0'.

See merge request !1517
parents d11a45c5 b1ea9f2e
No related branches found
No related tags found
2 merge requests!1525Updates from r20.0,!1517Fix linking data to specular instrument (#544)
Pipeline #93566 passed
......@@ -401,16 +401,10 @@ bool SpecularInstrumentItem::alignedWith(const RealItem* item) const
if (!item->hasNativeData())
return false;
// TODO do not compare native axis with main data axis due to different units
// remove native data from everywhere
// TODO remove native data from everywhere
// https://jugit.fz-juelich.de/mlz/bornagain/-/issues/331
//
// const auto& native_axis = item->nativeDatafield()->axis(0);
// return *instrumentAxis == native_axis;
//
// compare instrument axis with the main data axis instead
const auto& data_axis = item->dataItem()->datafield()->axis(0);
return *instrumentAxis == data_axis;
const auto& native_axis = item->nativeDatafield()->axis(0);
return *instrumentAxis == native_axis;
}
const ICoordSystem* SpecularInstrumentItem::createCoordSystem() const
......
......@@ -52,10 +52,10 @@ AlphaScanEditor::AlphaScanEditor(QWidget* parent, GrazingScanItem* item)
gform->addRow(m_selector);
//... update axis type combo (needs m_form)
if (idx != typeComboBox->currentIndex())
if (idx != typeComboBox->currentIndex()) {
typeComboBox->setCurrentIndex(idx);
else
onAxisTypeSelected(idx); // trigger update manually
onAxisTypeSelected(idx);
}
typeComboBox->setEnabled(m_item->pointwiseAlphaAxisDefined());
connect(typeComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this,
&AlphaScanEditor::onAxisTypeSelected);
......
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