Index: sansview/perspectives/fitting/basepage.py
===================================================================
--- sansview/perspectives/fitting/basepage.py	(revision 7987962386c420a7df095978198a719622d08aa0)
+++ sansview/perspectives/fitting/basepage.py	(revision a5701e67139bfd1a0206e748df96d61b9d153ebc)
@@ -1658,100 +1658,4 @@
                                     enable2D=self.enable2D)
         
-    def _set_model_sizer(self,sizer, box_sizer, title="", object=None):
-        """
-        Use lists to fill a sizer for model info
-        """
-       
-        sizer.Clear(True)
-        ##For MAC, this should defined here.
-        if box_sizer == None:
-            box_description= wx.StaticBox(self, -1,str(title))
-            boxsizer1 = wx.StaticBoxSizer(box_description, wx.VERTICAL)
-        else:
-            boxsizer1 = box_sizer
-        sizer_buttons = wx.BoxSizer(wx.HORIZONTAL)    
-        #--------------------------------------------------------
-        self.shape_rbutton = wx.RadioButton(self, -1, 'Shapes', style=wx.RB_GROUP)
-        self.shape_indep_rbutton = wx.RadioButton(self, -1, "Shape-Independent")
-        self.struct_rbutton = wx.RadioButton(self, -1, "Structure Factor ")
-        self.plugin_rbutton = wx.RadioButton(self, -1, "Customized Models")
-                
-        self.Bind( wx.EVT_RADIOBUTTON, self._show_combox,
-                            id= self.shape_rbutton.GetId() ) 
-        self.Bind( wx.EVT_RADIOBUTTON, self._show_combox,
-                            id= self.shape_indep_rbutton.GetId() ) 
-        self.Bind( wx.EVT_RADIOBUTTON, self._show_combox,
-                            id= self.struct_rbutton.GetId() ) 
-        self.Bind( wx.EVT_RADIOBUTTON, self._show_combox,
-                            id= self.plugin_rbutton.GetId() )  
-        #MAC needs SetValue
-        self.shape_rbutton.SetValue(True)
-      
-        sizer_radiobutton = wx.GridSizer(2, 2,5, 5)
-        sizer_radiobutton.Add(self.shape_rbutton)
-        sizer_radiobutton.Add(self.shape_indep_rbutton)
-
-        sizer_radiobutton.Add(self.plugin_rbutton)
-        sizer_radiobutton.Add(self.struct_rbutton)
-        sizer_buttons.Add(sizer_radiobutton)
-        # detail button
-        if object !=None:
-            sizer_buttons.Add((50,0))
-            sizer_buttons.Add(object)
-        
-        sizer_selection = wx.BoxSizer(wx.HORIZONTAL)
-        mutifactor_selection = wx.BoxSizer(wx.HORIZONTAL)
-        
-        self.text1 = wx.StaticText( self,-1,"" )
-        self.text2 = wx.StaticText( self,-1,"P(Q)*S(Q)" )
-        self.mutifactor_text = wx.StaticText( self,-1,"No. of Shells: " )
-        self.mutifactor_text1 = wx.StaticText( self,-1,"" )
-        self.show_sld_button = wx.Button( self,-1,"Show SLD Profile" )
-        self.show_sld_button.Bind(wx.EVT_BUTTON,self._on_show_sld)
-
-        self.formfactorbox = wx.ComboBox(self, -1,style=wx.CB_READONLY)
-        if self.model!= None:
-            self.formfactorbox.SetValue(self.model.name)
-           
-        self.structurebox = wx.ComboBox(self, -1,style=wx.CB_READONLY)
-        self.multifactorbox = wx.ComboBox(self, -1,style=wx.CB_READONLY)
-        self.initialize_combox()
-             
-        wx.EVT_COMBOBOX(self.formfactorbox,-1, self._on_select_model)
-        wx.EVT_COMBOBOX(self.structurebox,-1, self._on_select_model)
-        wx.EVT_COMBOBOX(self.multifactorbox,-1, self._on_select_model)
-        
-        ## check model type to show sizer
-        if self.model !=None:
-            self._set_model_sizer_selection( self.model )
-        
-        sizer_selection.Add(self.text1)
-        sizer_selection.Add((5,5))
-        sizer_selection.Add(self.formfactorbox)
-        sizer_selection.Add((5,5))
-        sizer_selection.Add(self.text2)
-        sizer_selection.Add((5,5))
-        sizer_selection.Add(self.structurebox)
-        #sizer_selection.Add((5,5))
-        mutifactor_selection.Add((10,5))
-        mutifactor_selection.Add(self.mutifactor_text)
-        mutifactor_selection.Add(self.multifactorbox)
-        mutifactor_selection.Add((5,5))
-        mutifactor_selection.Add(self.mutifactor_text1)
-        mutifactor_selection.Add((10,5))
-        mutifactor_selection.Add(self.show_sld_button)
-
-        boxsizer1.Add( sizer_buttons )
-        boxsizer1.Add( (15,15))
-        boxsizer1.Add( sizer_selection )
-        boxsizer1.Add( (10,10))
-        boxsizer1.Add(mutifactor_selection)
-        
-        self._set_multfactor_combobox()
-        self.multifactorbox.SetSelection(1)
-        self.show_sld_button.Hide()
-        #--------------------------------------------------------
-        sizer.Add(boxsizer1,0, wx.EXPAND | wx.ALL, 10)
-        sizer.Layout()
        
     def _on_show_sld(self, event=None):
Index: sansview/perspectives/fitting/fitpage.py
===================================================================
--- sansview/perspectives/fitting/fitpage.py	(revision fa65e996639027bc7b223b1a2ac9fabee2c194ea)
+++ sansview/perspectives/fitting/fitpage.py	(revision a5701e67139bfd1a0206e748df96d61b9d153ebc)
@@ -20,5 +20,5 @@
 (Chi2UpdateEvent, EVT_CHI2_UPDATE)   = wx.lib.newevent.NewEvent()
 _BOX_WIDTH = 76
-_DATA_BOX_WIDTH = 366
+_DATA_BOX_WIDTH = 300
 SMEAR_SIZE_L = 0.005
 SMEAR_SIZE_H = 0.006
@@ -473,11 +473,4 @@
         sizer_range.Add(wx.StaticText(self, -1, "Max: "),0, wx.LEFT, 10)
         sizer_range.Add(self.maximum_q,0, wx.LEFT, 10)
-        id = wx.NewId()
-        self.model_view = wx.Button(self, id,"Switch to 2D", size=(80, 23))
-        self.model_view.Bind(wx.EVT_BUTTON, self._onModel2D, id=id)
-        hint = "toggle view of model from 1D to 2D  or 2D from 1D"
-        self.model_view.SetToolTipString(hint)
-        sizer_range.Add(self.model_view,0, wx.LEFT, 10)
-
         boxsizer1.Add(sizer_data,0, wx.ALL, 10)
         boxsizer1.Add(sizer_range, 0 , wx.LEFT, 10)
@@ -500,8 +493,87 @@
         self.model_help.Bind(wx.EVT_BUTTON, self.on_model_help_clicked,id=id)
         self.model_help.SetToolTipString("Model Function Help")
-        
-        ## class base method  to add view 2d button    
-        self._set_model_sizer(sizer=sizer, box_sizer=boxsizer1, 
-                              title="Model",object=self.model_help )   
+        id = wx.NewId()
+        self.model_view = wx.Button(self, id,"Switch to 2D", size=(80, 23))
+        self.model_view.Bind(wx.EVT_BUTTON, self._onModel2D, id=id)
+        hint = "toggle view of model from 1D to 2D  or 2D from 1D"
+        self.model_view.SetToolTipString(hint)
+      
+        self.shape_rbutton = wx.RadioButton(self, -1, 'Shapes', style=wx.RB_GROUP)
+        self.shape_indep_rbutton = wx.RadioButton(self, -1, "Shape-Independent")
+        self.struct_rbutton = wx.RadioButton(self, -1, "Structure Factor ")
+        self.plugin_rbutton = wx.RadioButton(self, -1, "Customized Models")
+                
+        self.Bind(wx.EVT_RADIOBUTTON, self._show_combox,
+                            id= self.shape_rbutton.GetId()) 
+        self.Bind(wx.EVT_RADIOBUTTON, self._show_combox,
+                            id= self.shape_indep_rbutton.GetId()) 
+        self.Bind(wx.EVT_RADIOBUTTON, self._show_combox,
+                            id= self.struct_rbutton.GetId()) 
+        self.Bind(wx.EVT_RADIOBUTTON, self._show_combox,
+                            id= self.plugin_rbutton.GetId())  
+        #MAC needs SetValue
+        self.shape_rbutton.SetValue(True)
+      
+        sizer_radiobutton = wx.GridSizer(2, 3, 5, 5)
+        sizer_radiobutton.Add(self.shape_rbutton)
+        sizer_radiobutton.Add(self.shape_indep_rbutton)
+        #sizer_radiobutton.Add((5, 5))
+        sizer_radiobutton.Add(self.model_view,1, wx.LEFT, 20)
+        sizer_radiobutton.Add(self.plugin_rbutton)
+        sizer_radiobutton.Add(self.struct_rbutton)
+        #sizer_radiobutton.Add((5, 5))
+        sizer_radiobutton.Add(self.model_help,1, wx.LEFT, 20)
+        
+        sizer_selection = wx.BoxSizer(wx.HORIZONTAL)
+        mutifactor_selection = wx.BoxSizer(wx.HORIZONTAL)
+        
+        self.text1 = wx.StaticText(self,-1,"" )
+        self.text2 = wx.StaticText(self,-1,"P(Q)*S(Q)" )
+        self.mutifactor_text = wx.StaticText( self,-1,"No. of Shells: ")
+        self.mutifactor_text1 = wx.StaticText( self,-1,"" )
+        self.show_sld_button = wx.Button( self,-1,"Show SLD Profile" )
+        self.show_sld_button.Bind(wx.EVT_BUTTON,self._on_show_sld)
+
+        self.formfactorbox = wx.ComboBox(self, -1,style=wx.CB_READONLY)
+        if self.model!= None:
+            self.formfactorbox.SetValue(self.model.name)
+        self.structurebox = wx.ComboBox(self, -1, style=wx.CB_READONLY)
+        self.multifactorbox = wx.ComboBox(self, -1, style=wx.CB_READONLY)
+        self.initialize_combox()
+        wx.EVT_COMBOBOX(self.formfactorbox, -1, self._on_select_model)
+        wx.EVT_COMBOBOX(self.structurebox, -1, self._on_select_model)
+        wx.EVT_COMBOBOX(self.multifactorbox, -1, self._on_select_model)
+        ## check model type to show sizer
+        if self.model !=None:
+            self._set_model_sizer_selection(self.model)
+        
+        sizer_selection.Add(self.text1)
+        sizer_selection.Add((5, 5))
+        sizer_selection.Add(self.formfactorbox)
+        sizer_selection.Add((5, 5))
+        sizer_selection.Add(self.text2)
+        sizer_selection.Add((5, 5))
+        sizer_selection.Add(self.structurebox)
+       
+        mutifactor_selection.Add((10,5))
+        mutifactor_selection.Add(self.mutifactor_text)
+        mutifactor_selection.Add(self.multifactorbox)
+        mutifactor_selection.Add((5, 5))
+        mutifactor_selection.Add(self.mutifactor_text1)
+        mutifactor_selection.Add((10, 5))
+        mutifactor_selection.Add(self.show_sld_button)
+
+       
+        boxsizer1.Add(sizer_radiobutton)
+        boxsizer1.Add((10, 10))
+        boxsizer1.Add(sizer_selection)
+        boxsizer1.Add((10, 10))
+        boxsizer1.Add(mutifactor_selection)
+        
+        self._set_multfactor_combobox()
+        self.multifactorbox.SetSelection(1)
+        self.show_sld_button.Hide()
+        sizer.Add(boxsizer1,0, wx.EXPAND | wx.ALL, 10)
+        sizer.Layout()
         
     def _set_sizer_dispersion(self, dispersity):
@@ -1446,4 +1518,10 @@
             self.enable_smearer.Enable()
             
+    def get_view_mode(self):
+        """
+        return True if the panel allow 2D or False if 1D
+        """
+        return self.enable2D
+    
     def set_data(self, data):
         """
@@ -2630,6 +2708,5 @@
         self.Layout()
         self.Refresh()
-        self.SetupScrolling()
-        
+     
     def _onModel2D(self, event):
         """
Index: sansview/perspectives/fitting/fitpanel.py
===================================================================
--- sansview/perspectives/fitting/fitpanel.py	(revision 9f391af99fd282da0c7666de7e944051a6110f9d)
+++ sansview/perspectives/fitting/fitpanel.py	(revision a5701e67139bfd1a0206e748df96d61b9d153ebc)
@@ -269,8 +269,11 @@
             pos = self.GetPageIndex(page)
             if page.get_data() is None:
-                page.set_data(data)
-                self.SetPageText(pos, str(data.name))
-                self.SetSelection(pos)
-                return page
+                enable2D = page.get_view_mode()
+                if (data.__class__.__name__ == "Data2D" and enable2D)\
+                or (data.__class__.__name__ == "Data1D" and not enable2D):
+                    page.set_data(data)
+                    self.SetPageText(pos, str(data.name))
+                    self.SetSelection(pos)
+                    return page
             elif page.get_data().id == data.id:
                 msg = "Data already existing in the fitting panel"
Index: sansview/perspectives/fitting/fitting.py
===================================================================
--- sansview/perspectives/fitting/fitting.py	(revision 3fafe15ee1ca1b58f3857ba780b8212fcd0056f5)
+++ sansview/perspectives/fitting/fitting.py	(revision a5701e67139bfd1a0206e748df96d61b9d153ebc)
@@ -270,4 +270,5 @@
         for data in selected_data_list:
             self.add_fit_page(data=data)
+        
             wx.PostEvent(self.parent, NewPlotEvent(plot=data, 
                                                    title=str(data.title)))
@@ -645,11 +646,27 @@
         if page.id in self.page_finder:
             theory_data = self.page_finder[page.id].get_theory_data()
+            
             if issubclass(data.__class__, Data2D):
                 data.group_id.append(wx.NewId())
+                if theory_data is not None:
+                    group_id = str(page.id) + " Model1D"
+                    if group_id in theory_data.group_id:
+                        theory_data.group_id.remove(group_id)
+                    wx.PostEvent(self.parent, 
+                             NewPlotEvent(group_id=group_id,
+                                               action="delete"))
             else:
                 if theory_data is not None:
+                    group_id = str(page.id) + " Model2D"
+                    if group_id in theory_data.group_id:
+                        theory_data.group_id.remove(group_id)
+                        theory_data.group_id.append(wx.NewId())
                     group_id = theory_data.group_id[len(theory_data.group_id)-1]
                     if group_id not in data.group_id:
                         data.group_id.append(group_id)
+                    wx.PostEvent(self.parent, 
+                             NewPlotEvent(group_id=group_id,
+                                               action="delete"))
+            
             self.parent.update_data(prev_data=theory_data, new_data=data)       
         self.store_data(id=page.id, data=data, caption=page.window_name)
@@ -1117,4 +1134,5 @@
                 if group_id not in new_plot.group_id:
                     new_plot.group_id.append(group_id)
+               
             else:
                 _xaxis, _xunit = "\\rm{Q}", 'A^{-1}'
@@ -1144,5 +1162,5 @@
                              NewPlotEvent(group_id=str(id) + " Model2D",
                                                action="Hide"))
-                print "toggle model on  -->1d"
+                
             self.page_finder[id].set_theory_data(new_plot)
             if data is None:
