Index: fittingview/src/sans/perspectives/fitting/basepage.py
===================================================================
--- fittingview/src/sans/perspectives/fitting/basepage.py	(revision 19e614a88b2cede7e0b229c9b1a8813b1d5a6490)
+++ fittingview/src/sans/perspectives/fitting/basepage.py	(revision 940aca737db034347a7b2bcbe30f143b76e47cbc)
@@ -113,5 +113,6 @@
         self.enable2D = False
         self.is_mac = ON_MAC
-        
+        self.formfactorbox = None
+        self.structurebox = None
         ##list of model parameters. each item must have same length
         ## each item related to a given parameters
@@ -882,4 +883,19 @@
             self.state.disp_list = copy.deepcopy(self.disp_list)
             self.state.model = self.model.clone()
+            
+            #model combobox: complex code because of mac's silent error
+            if self.structurebox != None:
+                if self.structurebox.IsShown():
+                    self.state.structurecombobox = 'None'
+                    s_select = self.structurebox.GetSelection()
+                    if s_select > 0:
+                        self.state.structurecombobox = self.structurebox.\
+                        GetString(s_select)
+            if self.formfactorbox != None:
+                f_select = self.formfactorbox.GetSelection()
+                if f_select > 0:
+                        self.state.formfactorcombobox = self.formfactorbox.\
+                        GetString(f_select)
+                        
         #save radiobutton state for model selection
         self.state.shape_rbutton = self.shape_rbutton.GetValue()
@@ -887,7 +903,4 @@
         self.state.struct_rbutton = self.struct_rbutton.GetValue()
         self.state.plugin_rbutton = self.plugin_rbutton.GetValue()
-        #model combobox
-        self.state.structurebox = self.structurebox.GetLabel()
-        self.state.formfactorbox = self.formfactorbox.GetLabel()
         
         self.state.enable2D = copy.deepcopy(self.enable2D)
@@ -1231,5 +1244,5 @@
             structfactor_pos = 0
             for ind_struct in range(self.structurebox.GetCount()):
-                if self.structurebox.GetString(ind_struct) == (state.structurecombobox) > 0:
+                if self.structurebox.GetString(ind_struct) == (state.structurecombobox):
                     structfactor_pos = int(ind_struct)
                     break
@@ -1428,6 +1441,6 @@
         self.state.struct_rbutton = self.struct_rbutton.GetValue()
         self.state.plugin_rbutton = self.plugin_rbutton.GetValue()
-        self.state.structurebox = self.structurebox.GetLabel()
-        self.state.formfactorbox = self.formfactorbox.GetLabel()
+        self.state.structurecombobox = self.structurebox.GetLabel()
+        self.state.formfactorcombobox = self.formfactorbox.GetLabel()
        
         ## post state to fit panel
Index: fittingview/src/sans/perspectives/fitting/batchfitpage.py
===================================================================
--- fittingview/src/sans/perspectives/fitting/batchfitpage.py	(revision 978feaa29ed76d662061c04d032cb3c233c0b4bb)
+++ fittingview/src/sans/perspectives/fitting/batchfitpage.py	(revision 940aca737db034347a7b2bcbe30f143b76e47cbc)
@@ -38,4 +38,5 @@
         self.window_caption  = "BatchFit"
         self._set_save_flag(False)
+        self._set_bookmark_flag(False)
         
     def _fill_range_sizer(self):
@@ -365,6 +366,6 @@
             self._set_paste_flag(True)
             if self.data != None:
-                self._set_bookmark_flag(True)
-                self._keep.Enable(True)
+                self._set_bookmark_flag(False)
+                self._keep.Enable(False)
                 
             temp_smear = None
@@ -552,7 +553,7 @@
         else:
             if self.model != None:
-                self._set_bookmark_flag(True)
-                self._keep.Enable(True)
-            self._set_save_flag(True)
+                self._set_bookmark_flag(False)
+                self._keep.Enable(False)
+            self._set_save_flag(False)
             self._set_preview_flag(True)
             """
Index: fittingview/src/sans/perspectives/fitting/fit_thread.py
===================================================================
--- fittingview/src/sans/perspectives/fitting/fit_thread.py	(revision aff29139acc838bf3a7c4f262533479c9af11c3d)
+++ fittingview/src/sans/perspectives/fitting/fit_thread.py	(revision 940aca737db034347a7b2bcbe30f143b76e47cbc)
@@ -26,6 +26,6 @@
                  completefn = None,
                  updatefn   = None,
-                 yieldtime  = 0.01,
-                 worktime   = 0.01,
+                 yieldtime  = 0.03,
+                 worktime   = 0.03,
                  ftol       = None,
                  reset_flag = False):
Index: fittingview/src/sans/perspectives/fitting/fitpage.py
===================================================================
--- fittingview/src/sans/perspectives/fitting/fitpage.py	(revision ac2b8359c1233c434054b10e4d57526abdd9d28b)
+++ fittingview/src/sans/perspectives/fitting/fitpage.py	(revision 940aca737db034347a7b2bcbe30f143b76e47cbc)
@@ -1220,6 +1220,6 @@
                 is_data = check_data_validity(self.data)
                 if is_data:
-                    self._set_bookmark_flag(True)
-                    self._keep.Enable(True)
+                    self._set_bookmark_flag(not self.batch_on)
+                    self._keep.Enable(not self.batch_on)
                     self._set_save_flag(True)
             # Reset smearer, model and data
@@ -1482,37 +1482,39 @@
         if len(self.parameters) > 0:
             for item in self.parameters:
-                #Skip t ifhe angle parameters if 1D data
-                if self.data.__class__.__name__ != "Data2D" and \
-                        not self.enable2D:
-                    if item in self.orientation_params:
+                if item[0].IsShown():
+                    #Skip t ifhe angle parameters if 1D data
+                    if self.data.__class__.__name__ != "Data2D" and \
+                            not self.enable2D:
+                        if item in self.orientation_params:
+                            continue
+                    if item in self.param_toFit:
                         continue
-                if item in self.param_toFit:
-                    continue
-                ## hide statictext +/-
-                if len(item) < 4:
-                    continue
-                if item[3] != None and item[3].IsShown():
-                    item[3].Hide()
-                ## hide textcrtl  for error after fit
-                if item[4] != None and item[4].IsShown():
-                    item[4].Hide()
+                    ## hide statictext +/-
+                    if len(item) < 4:
+                        continue
+                    if item[3] != None and item[3].IsShown():
+                        item[3].Hide()
+                    ## hide textcrtl  for error after fit
+                    if item[4] != None and item[4].IsShown():
+                        item[4].Hide()
   
         if len(self.fittable_param) > 0:
             for item in self.fittable_param:
-                #Skip t ifhe angle parameters if 1D data
-                if self.data.__class__.__name__ != "Data2D" and \
-                        not self.enable2D:
-                    if item in self.orientation_params:
+                if item[0].IsShown():
+                    #Skip t ifhe angle parameters if 1D data
+                    if self.data.__class__.__name__ != "Data2D" and \
+                            not self.enable2D:
+                        if item in self.orientation_params:
+                            continue
+                    if item in self.param_toFit:
                         continue
-                if item in self.param_toFit:
-                    continue
-                if len(item) < 4:
-                    continue
-                ## hide statictext +/-
-                if item[3] != None and item[3].IsShown():
-                    item[3].Hide()
-                ## hide textcrtl  for error after fit
-                if item[4] != None and item[4].IsShown():
-                    item[4].Hide()
+                    if len(item) < 4:
+                        continue
+                    ## hide statictext +/-
+                    if item[3] != None and item[3].IsShown():
+                        item[3].Hide()
+                    ## hide textcrtl  for error after fit
+                    if item[4] != None and item[4].IsShown():
+                        item[4].Hide()
         return
                 
@@ -1847,6 +1849,6 @@
         else:
             if self.model != None:
-                self._set_bookmark_flag(True)
-                self._keep.Enable(True)
+                self._set_bookmark_flag(not self.batch_on)
+                self._keep.Enable(not self.batch_on)
                 
             self._set_save_flag(True)
@@ -1941,10 +1943,10 @@
             #replace data plot on combo box selection
             #by removing the previous selected data
-            wx.PostEvent(self._manager.parent,
-                         NewPlotEvent(action="remove",
-                                      group_id=self.graph_id, id=id))
+            #wx.PostEvent(self._manager.parent,
+            #             NewPlotEvent(action="remove",
+            #                          group_id=self.graph_id, id=id))
             #plot the current selected data
             wx.PostEvent(self._manager.parent,
-                         NewPlotEvent(plot=self.data,
+                         NewPlotEvent(action="check", plot=self.data,
                                       title=str(self.data.title)))
             self._draw_model()
@@ -2077,36 +2079,39 @@
         for item in self.param_toFit:
             if len(item) > 5 and item != None:
-                ## reset error value to initial state
-                if not self.is_mac:
-                    item[3].Hide()
-                    item[4].Hide()
-                for ind in range(len(out)):
-                    if item[1] == p_name[ind]:
-                        break
-                if len(out) <= len(self.param_toFit) and out[ind] != None:
-                    val_out = format_number(out[ind], True)
-                    item[2].SetValue(val_out)
-
-                if(cov != None and len(cov) == len(out)):
-                    try:
-                        if dispersity != None:
-                            if self.enable_disp.GetValue():
-                                if hasattr(self, "text_disp_1"):
-                                    if self.text_disp_1 != None:
-                                        if not self.text_disp_1.IsShown()\
-                                            and not self.is_mac:
-                                            self.text_disp_1.Show(True)
-                    except:
-                        pass
-                    
-                    if cov[ind] != None:
-                        if numpy.isfinite(float(cov[ind])):
-                            val_err = format_number(cov[ind], True)
-                            if not self.is_mac:
-                                item[3].Show(True)
-                                item[4].Show(True)
-                            item[4].SetValue(val_err)
-                            has_error = True
+                if item[0].IsShown():
+                    ## reset error value to initial state
+                    if not self.is_mac:
+                        item[3].Hide()
+                        item[4].Hide()
+                    for ind in range(len(out)):
+                        if item[1] == p_name[ind]:
+                            break
+                    if len(out) > 0 and out[ind] != None:
+                        val_out = format_number(out[ind], True)
+                        item[2].SetValue(val_out)
+    
+                    if(cov != None and len(cov) == len(out)):
+                        try:
+                            if dispersity != None:
+                                if self.enable_disp.GetValue():
+                                    if hasattr(self, "text_disp_1"):
+                                        if self.text_disp_1 != None:
+                                            if not self.text_disp_1.IsShown()\
+                                                and not self.is_mac:
+                                                self.text_disp_1.Show(True)
+                        except:
+                            pass
+                        
+                        if cov[ind] != None:
+                            if numpy.isfinite(float(cov[ind])):
+                                val_err = format_number(cov[ind], True)
+                                if not self.is_mac:
+                                    item[3].Show(True)
+                                    item[4].Show(True)
+                                item[4].SetValue(val_err)
+                                has_error = True
                 i += 1
+            else:
+                raise ValueError, "onsetValues: Invalid parameters..."
         #Show error title when any errors displayed
         if has_error:
@@ -2606,8 +2611,10 @@
         for item in self.parameters:
             if item[0].GetValue() and item not in self.param_toFit:
-                self.param_toFit.append(item)
+                if item[0].IsShown():
+                    self.param_toFit.append(item)
         for item in self.fittable_param:
             if item[0].GetValue() and item not in self.param_toFit:
-                self.param_toFit.append(item)
+                if item[0].IsShown():
+                    self.param_toFit.append(item)
         self.save_current_state_fit()
        
@@ -2616,5 +2623,5 @@
         param2fit = []
         for item in self.param_toFit:
-            if item[0]:
+            if item[0] and item[0].IsShown():
                 param2fit.append(item[1])
         self.parent._manager.set_param2fit(self.uid, param2fit)
@@ -2628,29 +2635,22 @@
             if  self.cb1.GetValue():
                 for item in self.parameters:
-                    ## for data2D select all to fit
-                    if self.data.__class__.__name__ == "Data2D" or \
-                            self.enable2D:
-                        item[0].SetValue(True)
-                        self.param_toFit.append(item)
-                    else:
-                        ## for 1D all parameters except orientation
-                        if not item in self.orientation_params:
+                    if item[0].IsShown():
+                        ## for data2D select all to fit
+                        if self.data.__class__.__name__ == "Data2D" or \
+                                self.enable2D:
                             item[0].SetValue(True)
                             self.param_toFit.append(item)
+                        else:
+                            ## for 1D all parameters except orientation
+                            if not item in self.orientation_params:
+                                item[0].SetValue(True)
+                                self.param_toFit.append(item)
+                    else:
+                        item[0].SetValue(False)
                 #if len(self.fittable_param)>0:
                 for item in self.fittable_param:
-                    if self.data.__class__.__name__ == "Data2D" or \
-                            self.enable2D:
-                        item[0].SetValue(True)
-                        self.param_toFit.append(item)
-                        try:
-                            if len(self.values[item[1]]) > 0:
-                                item[0].SetValue(False)
-                        except:
-                            pass
-
-                    else:
-                        ## for 1D all parameters except orientation
-                        if not item in self.orientation_params_disp:
+                    if item[0].IsShown():
+                        if self.data.__class__.__name__ == "Data2D" or \
+                                self.enable2D:
                             item[0].SetValue(True)
                             self.param_toFit.append(item)
@@ -2660,4 +2660,17 @@
                             except:
                                 pass
+    
+                        else:
+                            ## for 1D all parameters except orientation
+                            if not item in self.orientation_params_disp:
+                                item[0].SetValue(True)
+                                self.param_toFit.append(item)
+                                try:
+                                    if len(self.values[item[1]]) > 0:
+                                        item[0].SetValue(False)
+                                except:
+                                    pass
+                    else:
+                        item[0].SetValue(False)
 
             else:
@@ -2677,5 +2690,5 @@
         param2fit = []
         for item in self.param_toFit:
-            if item[0]:
+            if item[0] and item[0].IsShown():
                 param2fit.append(item[1])
         self.parent._manager.set_param2fit(self.uid, param2fit)
@@ -2694,5 +2707,5 @@
                     continue
             #Select parameters to fit for list of primary parameters
-            if item[0].GetValue():
+            if item[0].GetValue() and item[0].IsShown():
                 if not (item in self.param_toFit):
                     self.param_toFit.append(item)
@@ -2710,5 +2723,5 @@
                 if item in self.orientation_params:
                     continue
-            if item[0].GetValue():
+            if item[0].GetValue() and item[0].IsShown():
                 if not (item in self.param_toFit):
                     self.param_toFit.append(item)
@@ -2742,5 +2755,5 @@
         param2fit = []
         for item in self.param_toFit:
-            if item[0]:
+            if item[0] and item[0].IsShown():
                 param2fit.append(item[1])
         self.parent._manager.set_param2fit(self.uid, param2fit)
Index: fittingview/src/sans/perspectives/fitting/fitting.py
===================================================================
--- fittingview/src/sans/perspectives/fitting/fitting.py	(revision b9dd680bcb0bbb92d8a66d4ec3f0af3c4631854b)
+++ fittingview/src/sans/perspectives/fitting/fitting.py	(revision 940aca737db034347a7b2bcbe30f143b76e47cbc)
@@ -48,5 +48,5 @@
 
 
-if sys.platform.count("darwin") == 0:
+if sys.platform == "win32":
     ON_MAC = False
 else:
@@ -73,4 +73,5 @@
         self.weight = None
         self.fit_panel = None
+        self.plot_panel = None
         # Start with a good default
         self.elapsed = 0.022
@@ -460,4 +461,5 @@
                 
         """
+        self.plot_panel = plotpanel
         graph = plotpanel.graph
         fit_option = "Select data for fitting"
@@ -483,4 +485,5 @@
                 else:
                     return []
+            return [[fit_option, fit_hint, self._onSelect]]
         return []
 
@@ -1281,16 +1284,17 @@
         added to self.page_finder
         """
-        self.panel = event.GetEventObject()
+        panel = self.plot_panel
+        if panel == None:
+            raise ValueError, "Fitting:_onSelect: NonType panel"
         Plugin.on_perspective(self, event=event)
-        self.select_data(self.panel)
+        self.select_data(panel)
         
     def select_data(self, panel):
         """
         """
-        self.panel = panel
-        for plottable in self.panel.graph.plottables:
+        for plottable in panel.graph.plottables:
             if plottable.__class__.__name__ in ["Data1D", "Theory1D"]:
-                data_id = self.panel.graph.selected_plottable
-                if plottable == self.panel.plots[data_id]:
+                data_id = panel.graph.selected_plottable
+                if plottable == panel.plots[data_id]:
                     data = plottable
                     self.add_fit_page(data=[data])
@@ -1880,9 +1884,8 @@
 
         if len(title) > 1:
-            new_plot.title = "Model2D for " + data_name
+            new_plot.title = "Model2D for %s "% model.name + data_name
         new_plot.name = model.name + " [" + \
-                                    data_name + "-2D]"
+                                    data_name + "]"
         theory_data = deepcopy(new_plot)
-        theory_data.name = "Unknown"
         
         self.page_finder[page_id].set_theory_data(data=theory_data,
@@ -2128,10 +2131,12 @@
             residuals.xaxis('\\rm{Q} ', 'A^{-1}')
             residuals.yaxis('\\rm{Residuals} ', 'normalized')
+        theory_name = str(theory_data.name.split()[0])
         new_plot = residuals
-        new_plot.name = "Residuals for " + str(theory_data.name.split()[0]) + "[" +  str(data.name) +"]"
+        new_plot.name = "Residuals for " + str(theory_name) + "[" +\
+                        str(data.name) +"]"
         ## allow to highlight data when plotted
         new_plot.interactive = True
         ## when 2 data have the same id override the 1 st plotted
-        new_plot.id = "res" + str(data_copy.id)
+        new_plot.id = "res" + str(data_copy.id) + str(theory_name)
         ##group_id specify on which panel to plot this data
         group_id = self.page_finder[page_id].get_graph_id()
Index: fittingview/src/sans/perspectives/fitting/simfitpage.py
===================================================================
--- fittingview/src/sans/perspectives/fitting/simfitpage.py	(revision f32d144d174cb53c8dbffe9c43bb830e97f32b7b)
+++ fittingview/src/sans/perspectives/fitting/simfitpage.py	(revision 940aca737db034347a7b2bcbe30f143b76e47cbc)
@@ -215,4 +215,5 @@
             
         self._update_easy_setup_cb()
+        self.Layout()
         self.Refresh()
         
@@ -664,4 +665,7 @@
         ## some model or parameters can be constrained
         self._show_constraint()
+        self.sizer3.Layout()
+        self.Layout()
+        self.Refresh()
         
     def _fill_sizer_fit(self):
