Index: src/sas/qtgui/Perspectives/Invariant/InvariantPerspective.py
===================================================================
--- src/sas/qtgui/Perspectives/Invariant/InvariantPerspective.py	(revision f1f3e6a66c47bce134b59fe9f166fe14eac3a61d)
+++ src/sas/qtgui/Perspectives/Invariant/InvariantPerspective.py	(revision 7c487846c7ed6f3baee2597fb61629d47eb38267)
@@ -125,20 +125,18 @@
         self.setupMapper()
 
+        # Default enablement
+        self.cmdCalculate.setEnabled(False)
+
         # validator: double
-        self.txtBackgd.setValidator(QtGui.QDoubleValidator())
-        self.txtContrast.setValidator(QtGui.QDoubleValidator())
-        self.txtScale.setValidator(QtGui.QDoubleValidator())
-        self.txtPorodCst.setValidator(QtGui.QDoubleValidator())
+        self.txtBackgd.setValidator(GuiUtils.DoubleValidator())
+        self.txtContrast.setValidator(GuiUtils.DoubleValidator())
+        self.txtScale.setValidator(GuiUtils.DoubleValidator())
+        self.txtPorodCst.setValidator(GuiUtils.DoubleValidator())
 
         # validator: integer number
-        valid_regex_int = QtCore.QRegExp('^[+]?(\d+[.][0]*)$')
-        self.txtNptsLowQ.setValidator(QtGui.QRegExpValidator(valid_regex_int,
-                                                             self.txtNptsLowQ))
-        self.txtNptsHighQ.setValidator(QtGui.QRegExpValidator(valid_regex_int,
-                                                             self.txtNptsHighQ))
-        self.txtPowerLowQ.setValidator(QtGui.QRegExpValidator(valid_regex_int,
-                                                             self.txtPowerLowQ))
-        self.txtPowerHighQ.setValidator(QtGui.QRegExpValidator(valid_regex_int,
-                                                             self.txtPowerHighQ))
+        self.txtNptsLowQ.setValidator(QtGui.QIntValidator())
+        self.txtNptsHighQ.setValidator(QtGui.QIntValidator())
+        self.txtPowerLowQ.setValidator(GuiUtils.DoubleValidator())
+        self.txtPowerHighQ.setValidator(GuiUtils.DoubleValidator())
 
     def enabling(self):
@@ -159,4 +157,6 @@
             # reset the closability flag
             self.setClosable(value=False)
+            # Tell the MdiArea to close the container
+            self.parentWidget().close()
             event.accept()
         else:
@@ -227,5 +227,4 @@
 
         self.model = model
-        self.mapper.toFirst()
         self._data = GuiUtils.dataFromItem(self._model_item)
 
@@ -331,5 +330,4 @@
 
         if (calculation_failed):
-            self.mapper.toFirst()
             logging.warning('Calculation failed: {}'.format(msg))
             return self.model
@@ -416,6 +414,4 @@
             self.model.setItem(WIDGETS.D_HIGH_QSTAR_ERR, item)
 
-            self.mapper.toFirst()
-
             return self.model
 
@@ -504,11 +500,18 @@
         Error if it is larger than the distribution length
         """
+        try:
+            int_value = int(self.sender().text())
+        except ValueError:
+            self.sender().setStyleSheet(BG_RED)
+            self.cmdCalculate.setEnabled(False)
+            return
+
         if self._data:
-            if len(self._data.x) < int(self.sender().text()):
-                self.sender().setStyleSheet(QtCore.QString(BG_RED))
+            if len(self._data.x) < int_value:
+                self.sender().setStyleSheet(BG_RED)
                 logging.warning('The number of points must be smaller than {}'.format(len(self._data.x)))
                 self.cmdCalculate.setEnabled(False)
             else:
-                self.sender().setStyleSheet(QtCore.QString(BG_WHITE))
+                self.sender().setStyleSheet(BG_WHITE)
                 self.cmdCalculate.setEnabled(True)
         else:
@@ -565,10 +568,12 @@
 
         self.model.setItem(related_widgets[index_elt], item)
-
-        related_internal_values[index_elt] = float(self.sender().text())
-
-        # print possible_senders[index_elt], related_internal_values[index_elt]
-
-        self.mapper.toFirst()
+        try:
+            related_internal_values[index_elt] = float(self.sender().text())
+            self.sender().setStyleSheet(BG_WHITE)
+            self.cmdCalculate.setEnabled(True)
+        except ValueError:
+            # empty field, just skip
+            self.sender().setStyleSheet(BG_RED)
+            self.cmdCalculate.setEnabled(False)
 
     def lowGuinierAndPowerToggle(self, toggle):
@@ -761,5 +766,5 @@
         # Extract data on 1st child - this is the Data1D/2D component
         data = GuiUtils.dataFromItem(self._model_item)
-        self.model.item(WIDGETS.W_FILENAME).setData(QtCore.QVariant(self._model_item.text()))
+        self.model.item(WIDGETS.W_FILENAME).setData(self._model_item.text())
         # update GUI and model with info from loaded data
         self.updateGuiFromFile(data=data)
