From f839d6efd758592b5f1f61a716832e0a1a650b3a Mon Sep 17 00:00:00 2001
From: qbigot <quentin.bigot@insa-rennes.fr>
Date: Mon, 17 Jul 2017 11:14:49 +0200
Subject: [PATCH] modify buttons text in FilterChoice.cpp and reorganize code
 in FilterEditor.cpp

---
 app/Widgets/FilterChoice.cpp |  4 +--
 app/Widgets/FilterEditor.cpp | 50 ++++++++++++++++++------------------
 2 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/app/Widgets/FilterChoice.cpp b/app/Widgets/FilterChoice.cpp
index dd12b6f..35738f0 100644
--- a/app/Widgets/FilterChoice.cpp
+++ b/app/Widgets/FilterChoice.cpp
@@ -116,8 +116,8 @@ void FilterChoice::initUI()
     _stdDevBox->setVisible(false);
 
     QGroupBox* radioBox = new QGroupBox(tr("Resulting image type"));
-    _stdResButton = new QRadioButton(tr("Standard"));
-    _dblResButton = new QRadioButton(tr("Floating point"));
+    _stdResButton = new QRadioButton(tr("UChar"));
+    _dblResButton = new QRadioButton(tr("Double"));
     radioBox->setLayout(new QHBoxLayout());
     radioBox->layout()->addWidget(_stdResButton);
     radioBox->layout()->addWidget(_dblResButton);
diff --git a/app/Widgets/FilterEditor.cpp b/app/Widgets/FilterEditor.cpp
index c856ffa..c077319 100644
--- a/app/Widgets/FilterEditor.cpp
+++ b/app/Widgets/FilterEditor.cpp
@@ -151,33 +151,33 @@ void FilterEditor::saveXML(vector<Filter*> filtersToSave)
   }
   else
   {
-    file.open(QIODevice::ReadOnly);
-	  doc.setContent(&file);
-	  file.close();
-    
-    QDomElement root = doc.documentElement();
-    QDomNode child = root.firstChild();
-	  while(!child.isNull())
-	  {
-      QDomElement e = child.toElement();
-	    // We know how to treat appearance and geometry
-	    if (e.attribute("name") == _name->text())
-	    {
-          QMessageBox msgBox(QMessageBox::Warning, tr("Warning!"), tr("This filter name is already use."));
-        msgBox.setInformativeText(tr("Do you want to replace it?"));
-        msgBox.setStandardButtons(QMessageBox::No|QMessageBox::Yes);
-        msgBox.setDefaultButton(QMessageBox::No);
-        int ret = msgBox.exec();
-        if(ret == QMessageBox::Yes)
+        file.open(QIODevice::ReadOnly);
+        doc.setContent(&file);
+        file.close();
+
+        QDomElement root = doc.documentElement();
+        QDomNode child = root.firstChild();
+        while(!child.isNull())
         {
-          oldFilter = e;
-          replace = true;
+            QDomElement e = child.toElement();
+            // We know how to treat appearance and geometry
+            if (e.attribute("name") == _name->text())
+            {
+                QMessageBox msgBox(QMessageBox::Warning, tr("Warning!"), tr("This filter name is already use."));
+                msgBox.setInformativeText(tr("Do you want to replace it?"));
+                msgBox.setStandardButtons(QMessageBox::No|QMessageBox::Yes);
+                msgBox.setDefaultButton(QMessageBox::No);
+                int ret = msgBox.exec();
+                if(ret == QMessageBox::Yes)
+                {
+                    oldFilter = e;
+                    replace = true;
+                }
+                else
+                    return;
+            }
+            child = child.nextSibling();
         }
-        else
-          return;
-      }
-      child = child.nextSibling();
-	  }
   }
 
   // root node
-- 
GitLab