Index: sansview/perspectives/fitting/fitpage1D.py
===================================================================
--- sansview/perspectives/fitting/fitpage1D.py	(revision fd25fb08883664c73d21771d61af01133ba877c0)
+++ sansview/perspectives/fitting/fitpage1D.py	(revision 264df67411a82bce5ff29045a704610af62f6181)
@@ -455,139 +455,4 @@
         
     
-           
-    def old_set_panel(self,model):
-        """
-            Build the panel from the model content
-            @param model: the model selected in combo box for fitting purpose
-        """
-        self.sizer5.Clear(True)
-        self.parameters = []
-        self.param_toFit=[]
-        self.model = model
-        keys = self.model.getParamList()
-        #print "fitpage1D : dispersion list",self.model.getDispParamList()
-        keys.sort()
-        ik=0
-        im=1
-        
-        iy = 1
-        ix = 0
-        self.cb1 = wx.CheckBox(self, -1,"Select all", (10, 10))
-        wx.EVT_CHECKBOX(self, self.cb1.GetId(), self.select_all_param)
-        self.sizer5.Add(self.cb1,(iy, ix),(1,1),\
-                          wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
-        ix +=1
-        self.text2_2 = wx.StaticText(self, -1, 'Values')
-        self.sizer5.Add(self.text2_2,(iy, ix),(1,1),\
-                            wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
-        ix +=2
-        self.text2_3 = wx.StaticText(self, -1, 'Errors')
-        self.sizer5.Add(self.text2_3,(iy, ix),(1,1),\
-                            wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-        self.text2_3.Hide() 
-        ix +=1
-        self.text2_4 = wx.StaticText(self, -1, 'Units')
-        self.sizer5.Add(self.text2_4,(iy, ix),(1,1),\
-                            wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
-        self.text2_4.Hide()
-        disp_list=self.model.getDispParamList()
-        for item in keys:
-            if not item in disp_list:
-                iy += 1
-                ix = 0
-    
-                cb = wx.CheckBox(self, -1, item, (10, 10))
-                cb.SetValue(False)
-                self.sizer5.Add( cb,( iy, ix),(1,1),  wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
-                wx.EVT_CHECKBOX(self, cb.GetId(), self.select_param)
-            
-                ix += 1
-                value= self.model.getParam(item)
-                ctl1 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20), style=wx.TE_PROCESS_ENTER)
-                ctl1.SetValue(str (format_number(value)))
-                ctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)
-                ctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)
-                self.sizer5.Add(ctl1, (iy,ix),(1,1), wx.EXPAND)
-                
-                ix += 1
-                text2=wx.StaticText(self, -1, '+/-')
-                self.sizer5.Add(text2,(iy, ix),(1,1),\
-                                wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
-                text2.Hide()  
-                ix += 1
-                ctl2 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20), style=wx.TE_PROCESS_ENTER)
-                self.sizer5.Add(ctl2, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-                ctl2.Hide()
-                ix +=1
-                # Units
-                try:
-                    units = wx.StaticText(self, -1, self.model.details[item][0], style=wx.ALIGN_LEFT)
-                except:
-                    units = wx.StaticText(self, -1, "", style=wx.ALIGN_LEFT)
-                self.sizer5.Add(units, (iy,ix),(1,1),  wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-            """
-            else:
-                if not item in fixed:
-                    ip = 0
-                    iq += 1
-                    cb = wx.CheckBox(self, -1, item, (10, 10))
-                    cb.SetValue(False)
-                    self.sizer5.Add( cb,( iq, ip),(1,1),  wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
-                    wx.EVT_CHECKBOX(self, cb.GetId(), self.select_param)
-                    
-                    ip += 1
-                    value= self.model.getParam(item)
-                    ctl1 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20), style=wx.TE_PROCESS_ENTER)
-                    ctl1.SetValue(str (format_number(value)))
-                    ctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)
-                    ctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)
-                    self.sizer5.Add(ctl1, (iq,ip),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-                else:
-                    ik = 0
-                    text = wx.StaticText(self, -1, item, style=wx.ALIGN_LEFT)
-                    self.sizer6.Add(text,( im, ik),(1,1),  wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
-            
-                    ik += 1
-                    value= self.model.getParam(item)
-                    Tctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20), style=wx.TE_PROCESS_ENTER)
-                    Tctl.SetValue(str (format_number(value)))
-                    Tctl.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)
-                    Tctl.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)
-                    self.sizer6.Add(Tctl, (im,ik),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-                    self.fixed_param.append([item, Tctl])
-                    im += 1
-            #save data
-            """
-            self.parameters.append([cb,ctl1,text2,ctl2])
-                
-        iy+=1
-        self.sizer5.Add((20,20),(iy,ix),(1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
-        
-        #Display units text on panel
-        for item in keys:   
-            if self.model.details[item][0]!='':
-                self.text2_4.Show()
-                break
-            else:
-                self.text2_4.Hide()
-                
-        #(Disable or )Enable fit button 
-        """       
-        if not (len(self.param_toFit ) >0):
-            self.xmin.Enable()
-            self.xmax.Enable()
-        else:
-            self.xmin.Enable()
-            self.xmax.Enable()  
-        """
-                 
-        self.compute_chisqr()
-        self.vbox.Layout()
-        self.SetScrollbars(20,20,55,40)
-        self.Layout()
-        self.GrandParent.GetSizer().Layout()
-        
-       
-        
     def _onparamEnter(self,event):
         """ 
Index: sansview/perspectives/fitting/fitting.py
===================================================================
--- sansview/perspectives/fitting/fitting.py	(revision d0eac66388fd6cfa171b7a74d25de3303eeee742)
+++ sansview/perspectives/fitting/fitting.py	(revision 264df67411a82bce5ff29045a704610af62f6181)
@@ -134,4 +134,5 @@
         #index number to create random model name
         self.index_model = 0
+        self.index_theory= 0
         self.parent.Bind(EVT_SLICER_PANEL, self._on_slicer_event)
        
@@ -536,4 +537,5 @@
         name = evt.name
         
+        print "name fitting", name
         sim_page=self.fit_panel.GetPage(1)
         current_pg = self.fit_panel.get_current_page() 
@@ -543,8 +545,9 @@
             try:
                 metadata=self.page_finder[current_pg].get_data()
+                #M_name=model.name+"= "+name+"("+metadata.group_id+")"
+                M_name=model.name+"= "+name+"("+metadata.id+")"
+            except:
                 M_name=model.name+"= "+name+"("+metadata.group_id+")"
-            except:
-                M_name=model.name+"= "+name
-            #model.name="M"+str(self.index_model)
+            model.name="M"+str(self.index_model)
             self.index_model += 1  
             # save model name
@@ -590,5 +593,13 @@
                 theory.name = model.name
                 theory.group_id = data.group_id
-                theory.id = "Model"
+                if hasattr(data, "id"):
+                    import string
+                    if string.find("Model",data.id )!=None:
+                        #allow plotting on the same panel 
+                        theory.id =str(data.id )+" "+str(self.index_theory)
+                        self.index_theory +=1
+                    else:
+                        theory.id = "Model"
+                   
                 x_name, x_units = data.get_xaxis() 
                 y_name, y_units = data.get_yaxis() 
