Index: fittingview/src/sans/perspectives/fitting/simfitpage.py
===================================================================
--- fittingview/src/sans/perspectives/fitting/simfitpage.py	(revision 1aa614539edd9a7fa430eaeb6b767df6bee5f0ec)
+++ fittingview/src/sans/perspectives/fitting/simfitpage.py	(revision 53fc5ad97901592fd719d9a64c95e59c70e28b1b)
@@ -69,4 +69,6 @@
         ## number of constraint
         self.nb_constraint= 0
+        self.model_cbox_left = None
+        self.model_cbox_right = None
         self.uid = wx.NewId()
         ## draw page
@@ -187,8 +189,8 @@
             self._store_model()
             ## display constraint fields
-            if self.show_constraint.GetValue():
+            if self.show_constraint.GetValue() and\
+                             len(self.constraints_list)==0:
                 self._show_all_constraint() 
                 self._show_constraint()
-                return
         else:
             for item in self.model_list:
@@ -198,4 +200,6 @@
             ##constraint info
             self._hide_constraint()
+            
+        self._update_easy_setup_cb()
         
     def check_model_name(self,event):
@@ -204,4 +208,5 @@
         """
         self.model_toFit=[]
+        cbox = event.GetEventObject()
         for item in self.model_list:
             if item[0].GetValue()==True:
@@ -213,5 +218,5 @@
         
         ## display constraint fields
-        if len(self.model_toFit)==1:
+        if len(self.model_toFit)>=1:
             self._store_model()
             if self.show_constraint.GetValue() and\
@@ -219,8 +224,10 @@
                 self._show_all_constraint() 
                 self._show_constraint()
+
         elif len(self.model_toFit)< 1:
             ##constraint info
-            self._hide_constraint()              
-       
+            self._hide_constraint()  
+                        
+        self._update_easy_setup_cb()
         ## set the value of the main check button          
         if len(self.model_list)==len(self.model_toFit):
@@ -229,4 +236,24 @@
         else:
             self.cb1.SetValue(False)
+            
+    def _update_easy_setup_cb(self):   
+        """
+        Update easy setup combobox on selecting a model
+        """
+        if self.model_cbox_left != None and self.model_cbox_right != None:
+            self.model_cbox_left.Clear()
+            self.model_cbox_right.Clear()
+            #for id, model in self.constraint_dict.iteritems():
+            for item in self.model_toFit:
+                model = item[3]
+                ## check if all parameters have been selected for constraint
+                ## then do not allow add constraint on parameters
+                if str(model.name) not in self.model_cbox_left.GetItems():
+                    self.model_cbox_left.Append(str(model.name), model)
+                if str(model.name) not in self.model_cbox_right.GetItems():
+                    self.model_cbox_right.Append(str(model.name), model)
+            self.model_cbox_left.SetSelection(0)
+            self.sizer2.Layout()
+            self.sizer3.Layout()
         
     def draw_page(self):      
@@ -522,4 +549,10 @@
             self.btAdd.Hide()
         self._store_model()
+        if self.model_cbox_left != None:
+            self.model_cbox_left.Clear()
+            self.model_cbox_left = None
+        if self.model_cbox_right != None:
+            self.model_cbox_right.Clear()
+            self.model_cbox_right = None
         self.constraints_list = []   
         self.sizer_all_constraints.Clear(True) 
@@ -535,4 +568,5 @@
         fill combox box with list of parameters
         """
+        param_list = []
         ##This way PC/MAC both work, instead of using event.GetClientData().
         n = self.model_cbox.GetCurrentSelection()
@@ -541,5 +575,5 @@
             if model == dic_model:
                 param_list = self.page_finder[id].get_param2fit()
-                break
+                #break
         #param_list= get_fittableParam(model)
         length = len(self.constraints_list)
@@ -551,5 +585,5 @@
         for param in param_list:
             param_cbox.Append( str(param), model)
-            
+
         param_cbox.Show(True)
         self.btRemove.Show(True)
@@ -770,4 +804,6 @@
                             wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
         for id, value in self.page_finder.iteritems():
+            if id not in self.parent.opened_pages:
+                continue
             try:
                 ix = 0
