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

clang-format

parent 213c796f
No related branches found
No related tags found
1 merge request!1001GUI: show error bars for loaded reflectivity data
Pipeline #72735 passed
...@@ -334,14 +334,16 @@ void SpecularDataImportWidget::onPropertiesChanged() ...@@ -334,14 +334,16 @@ void SpecularDataImportWidget::onPropertiesChanged()
ASSERT(gSessionData->projectDocument.has_value()); ASSERT(gSessionData->projectDocument.has_value());
ProjectDocument* projectDocument = gSessionData->projectDocument.value(); ProjectDocument* projectDocument = gSessionData->projectDocument.value();
const auto* linkedInstrument = projectDocument->collectedItems()->findInstrumentById(realItem()->instrumentId()); const auto* linkedInstrument =
projectDocument->collectedItems()->findInstrumentById(realItem()->instrumentId());
if (linkedInstrument != nullptr) { if (linkedInstrument != nullptr) {
if (!linkedInstrument->alignedWith(realItem())) if (!linkedInstrument->alignedWith(realItem()))
realItem()->unlinkFromInstrument(); realItem()->unlinkFromInstrument();
bool can_relink = projectDocument->linkInstrumentManager()->canLinkDataToInstrument(realItem(), realItem()->instrumentId(), nullptr); bool can_relink = projectDocument->linkInstrumentManager()->canLinkDataToInstrument(
if(can_relink) realItem(), realItem()->instrumentId(), nullptr);
if (can_relink)
realItem()->linkToInstrument(linkedInstrument); realItem()->linkToInstrument(linkedInstrument);
} }
......
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