Index: sansview/perspectives/fitting/simfitpage.py
===================================================================
--- sansview/perspectives/fitting/simfitpage.py	(revision 0056173917543f1d2329e6d57462f61b0b92d261)
+++ sansview/perspectives/fitting/simfitpage.py	(revision 948add7b3e543b2f6928425d6b889b3328df699a)
@@ -44,6 +44,5 @@
 
         self.ctl2 = wx.TextCtrl(self, -1, style=wx.TE_MULTILINE)
-        #self.ctl2.Bind(wx.EVT_KILL_FOCUS, self._onTextEnter)
-        #self.ctl2.Bind(wx.EVT_TEXT_ENTER, self._onTextEnter)
+       
         self.sizer2.Add(self.ctl2, 0, wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE, 10)
        
@@ -65,7 +64,11 @@
     def onFit(self,event):
         """ signal for fitting"""
-        self._onTextEnter()
-        if len(self.model_toFit) >0 :
+        
+        if len(self.model_toFit) ==1 :
+            self.manager._on_single_fit()
+            print "simfitpage: when here"
+        elif len(self.model_toFit) > 1 :
             if len(self.params)>0:
+                self._onTextEnter()
                 self.set_model()
             else:
@@ -94,10 +97,14 @@
             for item in self.model_list:
                 item[0].SetValue(True)
-                item[1].schedule_tofit('True')
+                #item[1].schedule_tofit(1)
+                self.manager.schedule_for_fit( value=1,fitproblem =item[1]) 
                 self.model_toFit.append(item)
         else:
+            print"simfit: deselected all"
+            self.manager.schedule_for_fit( value=0,fitproblem =item[1]) 
             for item in self.model_list:
                 item[0].SetValue(False) 
-                item[1].schedule_tofit('False')
+                #item[1].schedule_tofit(0)
+                
             self.model_toFit=[]
        
@@ -113,4 +120,5 @@
         self.sizer1.Clear(True)
         self.page_finder=page_finder
+        self.cb1.SetValue(False)
         ix = 0
         iy = 1 
@@ -139,5 +147,5 @@
     def remove_model(self,delpage):
         """
-             Remove  a checkbox and the name realted to a model selected on page delpage
+             Remove  a checkbox and the name related to a model selected on page delpage
              @param delpage: the page removed
         """
@@ -147,4 +155,6 @@
         for item in self.model_list:
             try:
+                # redraw the panel without the name of the model associated 
+                # with the page to delete
                 if not delpage in item:
                     #print "simfitpage:  redraw modelname",item[3]
@@ -156,7 +166,9 @@
                     wx.EVT_CHECKBOX(self, cb.GetId(), self.select_model_name)
                 else:
+                    # if the page to delete in item remove it from the model list
                     self.model_list.remove(item)
             except:
-                raise
+                 wx.PostEvent(self.parent.GrandParent, StatusEvent(status="Page deletion Error: %s" % sys.exc_value))
+                 
         self.sizer1.Layout()        
         self.vbox.Layout()
@@ -172,8 +184,12 @@
                 item[1].schedule_tofit('True')
                 self.model_toFit.append(item)
-            else:
+                self.manager.schedule_for_fit( value=1,fitproblem =item[1]) 
+            else:
+                print"simfit: deselected one"
+                self.manager.schedule_for_fit( value=0,fitproblem =item[1]) 
                 if item in self.model_toFit:
                     self.model_toFit.remove(item)
-                    item[1].schedule_tofit('False')
+                    
+                    
                     self.cb1.SetValue(False)
         if len(self.model_list)==len(self.model_toFit):
@@ -181,5 +197,6 @@
         else:
             self.cb1.SetValue(False)
-  
+     
+        
    
     def set_model(self):
@@ -235,4 +252,5 @@
                 except:
                      wx.PostEvent(self.parent.GrandParent, StatusEvent(status="Constraint Error: %s" % sys.exc_value))
+                     return
         except:
             raise
