From f4144d31ae390e0c3b51e618dc3e05b2f6e18633 Mon Sep 17 00:00:00 2001
From: Elliot Oram <Elliot.Oram@stfc.ac.uk>
Date: Tue, 8 Sep 2015 11:14:32 +0100
Subject: [PATCH] Remove geometry drop down from UI

Refs #13110
---
 .../Indirect/ContainerSubtraction.h           |  2 -
 .../Indirect/ContainerSubtraction.ui          | 28 +-------------
 .../src/Indirect/ContainerSubtraction.cpp     | 38 +------------------
 3 files changed, 2 insertions(+), 66 deletions(-)

diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ContainerSubtraction.h b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ContainerSubtraction.h
index 02a8a6afcb2..b3f48fd3fc2 100644
--- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ContainerSubtraction.h
+++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ContainerSubtraction.h
@@ -13,8 +13,6 @@ public:
   ContainerSubtraction(QWidget *parent = 0);
 
 private slots:
-  /// Handles the geometry being changed
-  void handleGeometryChange(int index);
   /// Handles a new sample being loaded
   void newData(const QString &dataName);
   /// Updates the preview mini plot
diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ContainerSubtraction.ui b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ContainerSubtraction.ui
index 928c73328d1..f940b14a98c 100644
--- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ContainerSubtraction.ui
+++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ContainerSubtraction.ui
@@ -111,33 +111,7 @@
             <string>Options</string>
           </property>
           <layout class="QGridLayout" name="gridLayout">
-            <item row="0" column="1">
-              <widget class="QComboBox" name="cbGeometry">
-                <item>
-                  <property name="text">
-                    <string>Flat Plate</string>
-                  </property>
-                </item>
-                <item>
-                  <property name="text">
-                    <string>Cylinder</string>
-                  </property>
-                </item>
-                <item>
-                  <property name="text">
-                    <string>Annulus</string>
-                  </property>
-                </item>
-              </widget>
-            </item>
             <item row="0" column="0">
-              <widget class="QLabel" name="lbGeometry">
-                <property name="text">
-                  <string>Geometry:</string>
-                </property>
-              </widget>
-            </item>
-            <item row="1" column="0">
               <widget class="QCheckBox" name="ckScaleCan">
                 <property name="text">
                   <string>Scale Can by factor:</string>
@@ -147,7 +121,7 @@
                 </property>
               </widget>
             </item>
-            <item row="1" column="1">
+            <item row="0" column="1">
               <layout class="QHBoxLayout" name="loScaleFactor">
                 <item>
                   <widget class="QDoubleSpinBox" name="spCanScale">
diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/ContainerSubtraction.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/ContainerSubtraction.cpp
index d9cb55d89c9..490fe65842f 100644
--- a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/ContainerSubtraction.cpp
+++ b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/ContainerSubtraction.cpp
@@ -14,8 +14,6 @@ ContainerSubtraction::ContainerSubtraction(QWidget *parent)
   m_uiForm.setupUi(parent);
 
   // Connect slots
-  connect(m_uiForm.cbGeometry, SIGNAL(currentIndexChanged(int)), this,
-          SLOT(handleGeometryChanged(int)));
   connect(m_uiForm.dsSample, SIGNAL(dataReady(const QString &)), this,
           SLOT(newData(const QString &)));
   connect(m_uiForm.spPreviewSpec, SIGNAL(valueChanged(int)), this,
@@ -93,17 +91,8 @@ void ContainerSubtraction::run() {
   if (nameCutIndex == -1)
     nameCutIndex = sampleWsName.length();
 
-  QString correctionType;
-  switch (m_uiForm.cbGeometry->currentIndex()) {
-  case 0:
-    correctionType = "flt";
-    break;
-  case 1:
-    correctionType = "cyl";
-    break;
-  }
   const QString outputWsName =
-      sampleWsName.left(nameCutIndex) + +"_" + correctionType + "_Corrected";
+      sampleWsName.left(nameCutIndex)+"_Corrected";
 
   applyCorrAlg->setProperty("OutputWorkspace", outputWsName.toStdString());
 
@@ -192,31 +181,6 @@ void ContainerSubtraction::newData(const QString &dataName) {
   m_uiForm.ppPreview->addSpectrum("Sample", sampleWs, 0, Qt::black);
 }
 
-/**
- * Handles when the type of geometry changes
- *
- * Updates the file extension to search for
- */
-void ContainerSubtraction::handleGeometryChange(int index) {
-  QString ext("");
-  switch (index) {
-  case 0:
-    // Geometry is flat
-    ext = "_flt_abs";
-    break;
-  case 1:
-    // Geometry is cylinder
-    ext = "_cyl_abs";
-    break;
-  case 2:
-    // Geometry is annulus
-    ext = "_ann_abs";
-    break;
-  }
-  /*m_uiForm.dsCorrections->setWSSuffixes(QStringList(ext));
-  m_uiForm.dsCorrections->setFBSuffixes(QStringList(ext + ".nxs"));*/
-}
-
 /**
  * Replots the preview plot.
  *
-- 
GitLab