Index: sansview/perspectives/fitting/fit_thread.py
===================================================================
--- sansview/perspectives/fitting/fit_thread.py	(revision 202a7dc3415830eeb024ca443c22e5ff8d359985)
+++ sansview/perspectives/fitting/fit_thread.py	(revision 3215d32a629339b842a17d33a3b48be89a80efe3)
@@ -154,5 +154,5 @@
             self.starttime = time.time()
             wx.PostEvent(self.parent, StatusEvent(status=\
-                       "Setting the fit Engine ...",curr_thread=self,type="progress"))
+                       "Computing . ...",curr_thread=self,type="progress"))
             handler= ConsoleUpdate(parent= self.parent,improvement_delta=0.1)
             result = self.fitter.fit(handler= handler)
Index: sansview/perspectives/fitting/fitting.py
===================================================================
--- sansview/perspectives/fitting/fitting.py	(revision 202a7dc3415830eeb024ca443c22e5ff8d359985)
+++ sansview/perspectives/fitting/fitting.py	(revision 3215d32a629339b842a17d33a3b48be89a80efe3)
@@ -49,5 +49,5 @@
         self._fit_engine = 'scipy'
         self.enable_model2D=False
-        self.fit_id= 0
+        
         # Log startup
         logging.info("Fitting plug-in started")   
@@ -276,5 +276,5 @@
         
    
-    def _single_fit_completed(self,result,pars,cpage,qmin,qmax,elapsed,
+    def _single_fit_completed(self,result,pars,cpage,qmin,qmax,elapsed=None,
                               ymin=None, ymax=None, xmin=None, xmax=None):
         """
@@ -290,5 +290,5 @@
         #print "single fit ", pars,result.pvec,result.stderr,result.fitness
         wx.PostEvent(self.parent, StatusEvent(status="Single fit \
-        complete in %g sec" % elapsed, type="stop"))
+        complete " , type="stop"))
         try:
             for page, value in self.page_finder.iteritems():
@@ -299,4 +299,5 @@
                     break
             i = 0
+            print "single-->result",pars,cpage,str(result),result.parameters,result.fitness,result.stderr
             #print "fitting: single fit pars ", pars
             for name in pars:
@@ -330,32 +331,41 @@
             @param elapsed: computation time
         """
-        wx.PostEvent(self.parent, StatusEvent(status="Sinmultaneous fit \
-        complete in %g sec" % elapsed, type="stop"))
-        try:
-            for page, value in self.page_finder.iteritems():
-                if value.get_scheduled()==1:
-                    #fitdata = value.get_data()
-                    list = value.get_model()
-                    model= list[0]
-                   
-                    small_out = []
-                    small_cov = []
-                    i = 0
-                    #Separate result in to data corresponding to each page
-                    for p in result.parameters:
-                        model_name,param_name = self.split_string(p.name)  
-                        if model.name == model_name:
-                            small_out.append(p.value )
-                            small_cov.append(p.stderr)
-                            model.setParam(param_name,p.value)  
-                    # Display result on each page 
-                    page.onsetValues(result.fitness, small_out,small_cov)
-                    #Replot model
-                    self.plot_helper(currpage= page,qmin= qmin,qmax= qmax,
-                                     xmin=xmin, xmax=xmax,
-                                     ymin=ymin, ymax=ymax) 
-        except:
-             wx.PostEvent(self.parent, StatusEvent(status="Fitting error: %s" % sys.exc_value))
-            
+        if cpage!=None:
+            self._single_fit_completed(result=result,pars=pars,cpage=cpage,
+                                       qmin=qmin,qmax=qmax,
+                              ymin=ymin, ymax=ymax, xmin=xmin, xmax=xmax)
+            return
+        else:
+            wx.PostEvent(self.parent, StatusEvent(status="Simultaneous fit \
+            complete ", type="stop"))
+            print "result",cpage,str(result),result.parameters,result.fitness,result.stderr
+            
+            try:
+                for page, value in self.page_finder.iteritems():
+                    if value.get_scheduled()==1:
+                        #fitdata = value.get_data()
+                        list = value.get_model()
+                        model= list[0]
+                       
+                        small_out = []
+                        small_cov = []
+                        i = 0
+                        #Separate result in to data corresponding to each page
+                        for p in result.parameters:
+                            model_name,param_name = self.split_string(p.name)  
+                            if model.name == model_name:
+                                small_out.append(p.value )
+                                small_cov.append(p.stderr)
+                                model.setParam(param_name,p.value)  
+                        # Display result on each page 
+                        page.onsetValues(result.fitness, small_out,small_cov)
+                        #Replot model
+                        self.plot_helper(currpage= page,qmin= qmin,qmax= qmax,
+                                         xmin=xmin, xmax=xmax,
+                                         ymin=ymin, ymax=ymax) 
+            except:
+                raise
+                wx.PostEvent(self.parent, StatusEvent(status="Simultaneous Fitting error: %s" % sys.exc_value))
+                
   
     def _on_single_fit(self,id=None,qmin=None, qmax=None,ymin=None, ymax=None,xmin=None,xmax=None):
@@ -372,4 +382,5 @@
         self.fitter= Fit(self._fit_engine)
         #Setting an id to store model and data in fit engine
+        self.fit_id= 0
         if id!=None:
             self.fit_id= id
@@ -410,9 +421,8 @@
                 self.fitter.select_problem_for_fit(Uid=self.fit_id,value=value.get_scheduled())
                 page_fitted=current_pg
-                self.fit_id+=1
+                #self.fit_id+=1
                 #self.schedule_for_fit( 0,value) 
             except:
-                raise 
-                #wx.PostEvent(self.parent, StatusEvent(status="Fitting error: %s" % sys.exc_value))
+                wx.PostEvent(self.parent, StatusEvent(status="Single Fit error: %s" % sys.exc_value))
                 return
             # make sure to keep an alphabetic order 
@@ -440,5 +450,4 @@
                
             except:
-                raise
                 wx.PostEvent(self.parent, StatusEvent(status="Single Fit error: %s" % sys.exc_value))
                 return
@@ -456,5 +465,5 @@
         from sans.fit.Fitting import Fit
         self.fitter= Fit(self._fit_engine)
-        
+        self.fit_id= 0
         #Setting an id to store model and data
         if id!=None:
@@ -469,4 +478,6 @@
                     model= list[0]
                     #Create dictionary of parameters for fitting used
+                    cpage= page
+                    print ""
                     pars = []
                     templist = []
@@ -477,7 +488,8 @@
                             pars.append(name)
                         except:
-                            wx.PostEvent(self.parent, StatusEvent(status="Fitting error: %s" % sys.exc_value))
+                            wx.PostEvent(self.parent, StatusEvent(status="Simultaneous Fit error: %s" % sys.exc_value))
                             return
                     # need to check this print "new model "
+                    """
                     new_model=Model(model)
                     param=value.get_model_param()
@@ -493,14 +505,15 @@
                             #new_model.set( exec "%s"%(param_nam) = param_value)
                             new_model.parameterset[ param_name].set( param_value )
-                          
-                    self.fitter.set_model(new_model, self.fit_id, pars) 
+                    """      
+                    #self.fitter.set_model(new_model, self.fit_id, pars) 
+                    print "sim-->model",metadata,model,self.fit_id, pars
+                    self.fitter.set_model(Model(model), self.fit_id, pars) 
                     self.fitter.set_data(metadata,self.fit_id,qmin,qmax,ymin,ymax)
                     print "sim---->value of problem",value.get_scheduled()
                     self.fitter.select_problem_for_fit(Uid=self.fit_id,value=value.get_scheduled())
                     self.fit_id += 1 
-                    self.schedule_for_fit( 0,value) 
+                    #self.schedule_for_fit( 0,value) 
             except:
-                #raise
-                wx.PostEvent(self.parent, StatusEvent(status="Fitting error: %s" % sys.exc_value))
+                wx.PostEvent(self.parent, StatusEvent(status="Simultaneous Fit error: %s" % sys.exc_value))
                 return 
         #Do the simultaneous fit
@@ -509,6 +522,18 @@
             if self.calc_thread != None and self.calc_thread.isrunning():
                 self.calc_thread.stop()
-                    
-            self.calc_thread =FitThread(parent =self.parent,
+            if  self.fit_id==1:
+                self.calc_thread =FitThread(parent =self.parent,
+                                        fn= self.fitter,
+                                       qmin=qmin,
+                                       qmax=qmax,
+                                       ymin= ymin,
+                                       ymax= ymax,
+                                       cpage=cpage,
+                                       pars= pars,
+                                       completefn= self._simul_fit_completed,
+                                       updatefn=None)
+                      
+            else:
+                self.calc_thread =FitThread(parent =self.parent,
                                         fn= self.fitter,
                                        qmin=qmin,
@@ -522,6 +547,5 @@
             
         except:
-            #raise
-            wx.PostEvent(self.parent, StatusEvent(status="Simultaneous Fitting error: %s" % sys.exc_value))
+            wx.PostEvent(self.parent, StatusEvent(status="Simultaneous Fit error: %s" % sys.exc_value))
             return
         
Index: sansview/perspectives/fitting/simfitpage.py
===================================================================
--- sansview/perspectives/fitting/simfitpage.py	(revision f3430696b103035086cf87d79f2ebde7471e2288)
+++ sansview/perspectives/fitting/simfitpage.py	(revision 3215d32a629339b842a17d33a3b48be89a80efe3)
@@ -65,8 +65,8 @@
             page.set_model_parameter()
             
-        if len(self.model_toFit) ==1 :
-            self.manager._on_single_fit()
+        #if len(self.model_toFit) ==1 :
+        #    self.manager._on_single_fit()
            # print "simfitpage: when here"
-        elif len(self.model_toFit) > 1 :
+        if len(self.model_toFit) >= 1 :
             self._onTextEnter()
             self.set_model()
@@ -112,5 +112,9 @@
             @param page_finder: the dictionary containing models information
         """
-       
+        if len(self.model_list)>0:
+            for item in self.model_list:
+                #print "went here to clear"
+                item[0].SetValue(False) 
+                self.manager.schedule_for_fit( value=0,fitproblem =item[1])
         self.model_list=[]
         self.model_toFit=[]
