From eb9d39731a818cd3a4a1da6df8d289b6f4024d41 Mon Sep 17 00:00:00 2001
From: Joachim Wuttke <j.wuttke@fz-juelich.de>
Date: Fri, 3 Nov 2023 15:15:39 +0100
Subject: [PATCH] + local var

---
 GUI/View/Instrument/AlphaScanEditor.cpp    |  2 +-
 GUI/View/Instrument/DetectorEditor.cpp     | 19 ++++++++++---------
 GUI/View/Instrument/DistributionEditor.h   |  2 +-
 GUI/View/Instrument/DistributionSelector.h |  2 +-
 GUI/View/Instrument/ScanEditor.cpp         |  6 +++---
 5 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/GUI/View/Instrument/AlphaScanEditor.cpp b/GUI/View/Instrument/AlphaScanEditor.cpp
index af46f9ebafd..eecbfd42b3f 100644
--- a/GUI/View/Instrument/AlphaScanEditor.cpp
+++ b/GUI/View/Instrument/AlphaScanEditor.cpp
@@ -16,8 +16,8 @@
 #include "GUI/Model/Beam/GrazingScanItem.h"
 #include "GUI/Model/Descriptor/DistributionItems.h"
 #include "GUI/View/Device/SphericalAxisForm.h"
-#include "GUI/View/Instrument/DistributionSelector.h"
 #include "GUI/View/Instrument/DistributionPlot.h"
+#include "GUI/View/Instrument/DistributionSelector.h"
 
 AlphaScanEditor::AlphaScanEditor(QWidget* parent, GrazingScanItem* item, bool allow_distr)
     : CollapsibleGroupBox("Grazing angles (deg)", parent, item->expandGroupBox)
diff --git a/GUI/View/Instrument/DetectorEditor.cpp b/GUI/View/Instrument/DetectorEditor.cpp
index f29bf39fa30..212a7410d6f 100644
--- a/GUI/View/Instrument/DetectorEditor.cpp
+++ b/GUI/View/Instrument/DetectorEditor.cpp
@@ -155,15 +155,16 @@ DetectorEditor::DetectorEditor(QWidget* parent, GISASInstrumentItem* instrItem)
     auto* aliLine = new QHBoxLayout;
     layout->addLayout(aliLine);
 
-    QFormLayout* alignmentForm = new QFormLayout;
-    aliLine->addLayout(alignmentForm);
-    alignmentForm->addRow("Alignment:",
-                          GUI::Util::createSafeComboBox(
-                              [detectorItem] { return detectorItem->detectorAlignmentCombo(); },
-                              [this, detectorItem](const QString& t) {
-                                  detectorItem->setDetectorAlignment(t);
-                                  emit dataChanged();
-                              }));
+    auto* aliForm = new QFormLayout;
+    aliLine->addLayout(aliForm);
+
+    auto* aliCombo = GUI::Util::createSafeComboBox(
+        [detectorItem] { return detectorItem->detectorAlignmentCombo(); },
+        [this, detectorItem](const QString& t) {
+            detectorItem->setDetectorAlignment(t);
+            emit dataChanged();
+        });
+    aliForm->addRow("Alignment:", aliCombo);
 
     auto* detposLayout = new QFormLayout;
     aliLine->addLayout(detposLayout);
diff --git a/GUI/View/Instrument/DistributionEditor.h b/GUI/View/Instrument/DistributionEditor.h
index d64df017310..95e096efed7 100644
--- a/GUI/View/Instrument/DistributionEditor.h
+++ b/GUI/View/Instrument/DistributionEditor.h
@@ -15,8 +15,8 @@
 #ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_DISTRIBUTIONEDITOR_H
 #define BORNAGAIN_GUI_VIEW_INSTRUMENT_DISTRIBUTIONEDITOR_H
 
-#include "GUI/View/Instrument/DistributionSelector.h" // MeanConfig
 #include "GUI/Support/Data/ID.h"
+#include "GUI/View/Instrument/DistributionSelector.h" // MeanConfig
 #include "GUI/View/Widget/GroupBoxes.h"
 #include <optional>
 
diff --git a/GUI/View/Instrument/DistributionSelector.h b/GUI/View/Instrument/DistributionSelector.h
index 8f22f2db764..dc3f94cf7b7 100644
--- a/GUI/View/Instrument/DistributionSelector.h
+++ b/GUI/View/Instrument/DistributionSelector.h
@@ -16,8 +16,8 @@
 #define BORNAGAIN_GUI_VIEW_INSTRUMENT_DISTRIBUTIONSELECTOR_H
 
 #include "GUI/Support/Data/ID.h"
-#include <optional>
 #include <QWidget>
+#include <optional>
 
 class BeamDistributionItem;
 class DistributionItem;
diff --git a/GUI/View/Instrument/ScanEditor.cpp b/GUI/View/Instrument/ScanEditor.cpp
index 318b83ffaa5..81baff39f4a 100644
--- a/GUI/View/Instrument/ScanEditor.cpp
+++ b/GUI/View/Instrument/ScanEditor.cpp
@@ -46,9 +46,9 @@ ScanEditor::ScanEditor(QWidget* parent, ScanItem* item, InstrumentNotifier* ec,
     auto* hLayout = new QHBoxLayout;
     layout->addLayout(hLayout);
 
-    auto* wavelengthEditor =
-        new DistributionEditor("Wavelength (nm)", MeanConfig{true}, GUI::ID::Distributions::Symmetric,
-                               this, item->wavelengthItem(), allow_distr);
+    auto* wavelengthEditor = new DistributionEditor("Wavelength (nm)", MeanConfig{true},
+                                                    GUI::ID::Distributions::Symmetric, this,
+                                                    item->wavelengthItem(), allow_distr);
     hLayout->addWidget(wavelengthEditor);
 
     auto* inclinationEditor = new AlphaScanEditor(this, item->grazingScanItem(), allow_distr);
-- 
GitLab