Index: src/sas/qtgui/Perspectives/Fitting/Constraint.py
===================================================================
--- src/sas/qtgui/Perspectives/Fitting/Constraint.py	(revision 14ec91c506393c404c69a71e75131fb3d62e4230)
+++ src/sas/qtgui/Perspectives/Fitting/Constraint.py	(revision baeac95a855b6fc0dabd8f734a6796a896125f45)
@@ -5,7 +5,8 @@
     hence made into a class.
     """
-    def __init__(self, parent=None, param=None, value=0.0, min=None, max=None, func=None):
+    def __init__(self, parent=None, param=None, value=0.0, min=None, max=None, func=None, value_ex=None):
         self._value = value
         self._param = param
+        self._value_ex = value_ex
         self._func = func
         self.active = True
@@ -15,4 +16,5 @@
     @property
     def value(self):
+        # value/parameter to fit to (e.g. 1.0 or sld)
         return self._value
 
@@ -22,5 +24,15 @@
 
     @property
+    def value_ex(self):
+        # full parameter name to fit to (e.g. M1.sld)
+        return self._value_ex
+
+    @value_ex.setter
+    def value_ex(self, val):
+        self._value_ex = val
+
+    @property
     def param(self):
+        # parameter which is being fitted
         return self._param
 
@@ -31,4 +43,6 @@
     @property
     def func(self):
+        # Function to be used for constraint
+        # e.g. sqrt(M1.sld+1.0)
         return self._func
 
@@ -39,4 +53,5 @@
     @property
     def min(self):
+        # min param value for single value constraints
         return self._min
 
@@ -47,4 +62,5 @@
     @property
     def max(self):
+        # max param value for single value constraints
         return self._max
 
Index: src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
===================================================================
--- src/sas/qtgui/Perspectives/Fitting/FittingWidget.py	(revision e5ae812f0eed528ccbbb352ea37a563795d26902)
+++ src/sas/qtgui/Perspectives/Fitting/FittingWidget.py	(revision baeac95a855b6fc0dabd8f734a6796a896125f45)
@@ -622,4 +622,5 @@
         to_string = "to its current value" if num_rows == 1 else "to their current values"
         has_constraints = any([self.rowHasConstraint(i) for i in rows])
+        has_real_constraints = any([self.rowHasActiveConstraint(i) for i in rows])
 
         self.actionSelect = QtWidgets.QAction(self)
@@ -639,4 +640,8 @@
         self.actionRemoveConstraint.setText(QtCore.QCoreApplication.translate("self", "Remove constraint"))
 
+        self.actionEditConstraint = QtWidgets.QAction(self)
+        self.actionEditConstraint.setObjectName("actionEditConstrain")
+        self.actionEditConstraint.setText(QtCore.QCoreApplication.translate("self", "Edit constraint"))
+
         self.actionMultiConstrain = QtWidgets.QAction(self)
         self.actionMultiConstrain.setObjectName("actionMultiConstrain")
@@ -653,4 +658,6 @@
         if has_constraints:
             menu.addAction(self.actionRemoveConstraint)
+            if num_rows == 1 and has_real_constraints:
+                menu.addAction(self.actionEditConstraint)
             #if num_rows == 1:
             #    menu.addAction(self.actionEditConstraint)
@@ -663,4 +670,5 @@
         self.actionConstrain.triggered.connect(self.addSimpleConstraint)
         self.actionRemoveConstraint.triggered.connect(self.deleteConstraint)
+        self.actionEditConstraint.triggered.connect(self.editConstraint)
         self.actionMutualMultiConstrain.triggered.connect(self.showMultiConstraint)
         self.actionSelect.triggered.connect(self.selectParameters)
@@ -700,6 +708,10 @@
         new_func = c_text.replace(param_used, updated_param_used)
         constraint.func = new_func
+        constraint.value_ex = updated_param_used
         # Which row is the constrained parameter in?
         row = self.getRowFromName(constraint.param)
+
+        # what is the parameter to constraint to?
+        constraint.value = param_used
 
         # Create a new item and add the Constraint object as a child
@@ -797,4 +809,44 @@
             self.modifyViewOnRow(row, font=font, brush=brush)
         self.communicate.statusBarUpdateSignal.emit('Constraint added')
+
+    def editConstraint(self):
+        """
+        Delete constraints from selected parameters.
+        """
+        params_list = [s.data() for s in self.lstParams.selectionModel().selectedRows()
+                   if self.isCheckable(s.row())]
+        assert len(params_list) == 1
+        row = self.lstParams.selectionModel().selectedRows()[0].row()
+        constraint = self.getConstraintForRow(row)
+        # Create and display the widget for param1 and param2
+        mc_widget = MultiConstraint(self, params=params_list, constraint=constraint)
+        # Check if any of the parameters are polydisperse
+        if not np.any([FittingUtilities.isParamPolydisperse(p, self.model_parameters, is2D=self.is2D) for p in params_list]):
+            # no parameters are pd - reset the text to not show the warning
+            mc_widget.lblWarning.setText("")
+        if mc_widget.exec_() != QtWidgets.QDialog.Accepted:
+            return
+
+        constraint = Constraint()
+        c_text = mc_widget.txtConstraint.text()
+
+        # widget.params[0] is the parameter we're constraining
+        constraint.param = mc_widget.params[0]
+        # parameter should have the model name preamble
+        model_name = self.kernel_module.name
+        # param_used is the parameter we're using in constraining function
+        param_used = mc_widget.params[1]
+        # Replace param_used with model_name.param_used
+        updated_param_used = model_name + "." + param_used
+        # Update constraint with new values
+        constraint.func = c_text
+        constraint.value_ex = updated_param_used
+        constraint.value = param_used
+
+        # Which row is the constrained parameter in?
+        row = self.getRowFromName(constraint.param)
+
+        # Create a new item and add the Constraint object as a child
+        self.addConstraintToRow(constraint=constraint, row=row)
 
     def deleteConstraint(self):
@@ -3603,5 +3655,8 @@
                 value = constraint.value
                 func = constraint.func
-                cons = (value, func)
+                value_ex = constraint.value_ex
+                param = constraint.param
+
+                cons = (value, param, value_ex, func)
 
             param_list.append([param_name, param_checked, param_value, param_error, param_min, param_max, cons])
@@ -3853,10 +3908,14 @@
             # constraints
             cons = param_dict[param_name][4+ioffset]
-            if cons is not None and cons:
+            if cons is not None and len(cons)==4:
                 value = cons[0]
-                function = cons[1]
+                param = cons[1]
+                value_ex = cons[2]
+                function = cons[3]
                 constraint = Constraint()
                 constraint.value = value
                 constraint.func = function
+                constraint.param = param
+                constraint.value_ex = value_ex
                 self.addConstraintToRow(constraint=constraint, row=row)
 
Index: src/sas/qtgui/Perspectives/Fitting/MultiConstraint.py
===================================================================
--- src/sas/qtgui/Perspectives/Fitting/MultiConstraint.py	(revision 305114c33963ce5b43f94d3b16fc71e316f72e3a)
+++ src/sas/qtgui/Perspectives/Fitting/MultiConstraint.py	(revision baeac95a855b6fc0dabd8f734a6796a896125f45)
@@ -20,5 +20,5 @@
     Logic class for interacting with MultiConstrainedUI view
     """
-    def __init__(self, parent=None, params=None):
+    def __init__(self, parent=None, params=None, constraint=None):
         """
         parent: ConstraintWidget object
@@ -31,4 +31,15 @@
         self.params = params
         self.parent = parent
+        self.function = None
+
+        self.input_constraint = constraint
+        if self.input_constraint is not None:
+            variable = constraint.value
+            #variable = func[func.index('.')+1:]
+            self.function = constraint.func
+            self.params.append(variable)
+            self.model_name = constraint.value_ex
+        else:
+            self.model_name = self.params[1]
 
         self.setupLabels()
@@ -36,6 +47,8 @@
 
         # Set param text control to the second parameter passed
-        self.txtConstraint.setText(self.params[1])
-
+        if self.input_constraint is None:
+            self.txtConstraint.setText(self.params[1])
+        else:
+            self.txtConstraint.setText(self.function)
         self.cmdOK.clicked.connect(self.accept)
         self.cmdHelp.clicked.connect(self.onHelp)
@@ -52,4 +65,6 @@
         # Switch parameters
         self.params[1], self.params[0] = self.params[0], self.params[1]
+        # change fully qualified param name (e.g. M1.sld -> M1.sld_solvent)
+        self.model_name = self.model_name.replace(self.params[0], self.params[1])
         # Try to swap parameter names in the line edit
         current_text = self.txtConstraint.text()
@@ -64,6 +79,6 @@
         Setup labels based on current parameters
         """
-        l1 = self.params[0]
-        l2 = self.params[1]
+        l1 = str(self.params[0])
+        l2 = str(self.params[1])
         self.txtParam1.setText(l1)
         self.txtParam1_2.setText(l1)
@@ -99,6 +114,5 @@
             return False
 
-        param_str = str(self.params[1])
-        constraint_text = constraint_text.strip()
+        param_str = self.model_name
 
         # 1. just the parameter
Index: src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingWidgetTest.py
===================================================================
--- src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingWidgetTest.py	(revision ec4a14367fbe5c81c560b98221b989122cfc2d44)
+++ src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingWidgetTest.py	(revision baeac95a855b6fc0dabd8f734a6796a896125f45)
@@ -185,6 +185,6 @@
 
         # Observe no such luck
-        self.assertEqual(self.widget.cbCategory.currentIndex(), 6)
-        self.assertEqual(self.widget.cbModel.count(), 29)
+        self.assertEqual(self.widget.cbCategory.currentIndex(), 7)
+        self.assertEqual(self.widget.cbModel.count(), 30)
 
         # Set the structure factor
@@ -219,9 +219,5 @@
         # 
         # Now change the model
-<<<<<<< HEAD
         self.widget.cbModel.setCurrentIndex(4)
-=======
-        self.widget.cbModel.setCurrentIndex(2)
->>>>>>> ESS_GUI
         self.assertEqual(self.widget.cbModel.currentText(),'dab')
 
