Index: sansview/perspectives/fitting/basepage.py
===================================================================
--- sansview/perspectives/fitting/basepage.py	(revision 1328e03fb2dbb5ff0404eac3502aef46dc24fe5d)
+++ sansview/perspectives/fitting/basepage.py	(revision 376916c3539d404b91d40c03085a6603a86cae42)
@@ -471,7 +471,16 @@
             
             for k, list in self.model_list_box.iteritems():
-                if k == "shapes":
+                if k in["P(Q)*S(Q)","Shapes" ] and class_name in self.model_list_box["Shapes"]:
                     self.shape_rbutton.SetValue(True)
-                elif k == "Shape-independent":
+                    ## fill the form factor list with new model
+                    self._populate_box(self.formfactorbox,self.model_list_box["Shapes"])
+                    items = self.formfactorbox.GetItems()
+                    ## set comboxbox to the selected item
+                    for i in range(len(items)):
+                        if items[i]== str(name):
+                            self.formfactorbox.SetSelection(i)
+                            break
+                    return
+                elif k == "Shape-Independent":
                     self.shape_indep_rbutton.SetValue(True)
                 elif k == "Structure Factors":
@@ -479,5 +488,5 @@
                 else:
                     self.plugin_rbutton.SetValue(True)
-                    
+               
                 if class_name in list:
                     ## fill the form factor list with new model
@@ -491,13 +500,23 @@
                     break
         else:
-            ## Select the model from the combo box
+            ## Select the model from the combobox
             class_name = model.__class__
             name = model.name
             self.formfactorbox.Clear()
             items = self.formfactorbox.GetItems()
+    
             for k, list in self.model_list_box.iteritems():
-                if k == "shapes":
+                if k in["P(Q)*S(Q)","Shapes" ] and class_name in self.model_list_box["Shapes"]:
                     self.shape_rbutton.SetValue(True)
-                elif k == "Shape-independent":
+                    ## fill the form factor list with new model
+                    self._populate_box(self.formfactorbox,self.model_list_box["Shapes"])
+                    items = self.formfactorbox.GetItems()
+                    ## set comboxbox to the selected item
+                    for i in range(len(items)):
+                        if items[i]== str(name):
+                            self.formfactorbox.SetSelection(i)
+                            break
+                    return
+                elif k == "Shape-Independent":
                     self.shape_indep_rbutton.SetValue(True)
                 elif k == "Structure Factors":
@@ -506,5 +525,5 @@
                     self.plugin_rbutton.SetValue(True)
                 if class_name in list:
-                ## fill the form factor list with new model
+                    ## fill the form factor list with new model
                     self._populate_box(self.formfactorbox, list)
                     items = self.formfactorbox.GetItems()
@@ -541,8 +560,8 @@
         boxsizer1 = wx.StaticBoxSizer(box_description, wx.VERTICAL)
         #--------------------------------------------------------
-        self.shape_rbutton = wx.RadioButton(self, -1, 'Shape', style=wx.RB_GROUP)
-        self.shape_indep_rbutton = wx.RadioButton(self, -1, "Shape Independent")
-        self.struct_rbutton = wx.RadioButton(self, -1, "Structure ")
-        self.plugin_rbutton = wx.RadioButton(self, -1, "customized Model")
+        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.multip_cb = wx.CheckBox(self, -1,"P(Q)*S(Q)")
         
@@ -591,5 +610,5 @@
         ## fill combox box
         if len(self.model_list_box)>0:
-            self._populate_box( self.formfactorbox,self.model_list_box["shapes"])
+            self._populate_box( self.formfactorbox,self.model_list_box["Shapes"])
        
         if len(self.model_list_box)>0:
@@ -631,23 +650,25 @@
         self.page_info.save_radiobox_state( self.plugin_rbutton )
         
-        
-        
-        if self.shape_rbutton.GetValue():
-            ##fill the comboxbox with form factor list
+        ## Don't want to populate combo box again if the event comes from check box
+        if self.shape_rbutton.GetValue()and\
+             event.GetEventObject()==self.shape_rbutton:
+            ##fill the combobox with form factor list
             self.structurebox.Hide()
             self.text2.Hide()
             self.formfactorbox.Clear()
-            self._populate_box( self.formfactorbox,self.model_list_box["shapes"])
-            
-        if self.shape_indep_rbutton.GetValue():
-            ##fill the comboxbox with shape independent  factor list
+            self._populate_box( self.formfactorbox,self.model_list_box["Shapes"])
+            
+        if self.shape_indep_rbutton.GetValue()and\
+             event.GetEventObject()==self.shape_indep_rbutton:
+            ##fill the combobox with shape independent  factor list
             self.structurebox.Hide()
             self.text2.Hide()
             self.formfactorbox.Clear()
             self._populate_box( self.formfactorbox,
-                                self.model_list_box["Shape-independent"])
-            
-        if self.struct_rbutton.GetValue():
-            ##fill the comboxbox with structure factor list
+                                self.model_list_box["Shape-Independent"])
+            
+        if self.struct_rbutton.GetValue() and\
+             event.GetEventObject()==self.struct_rbutton:
+            ##fill the combobox with structure factor list
             self.structurebox.Hide()
             self.text2.Hide()
@@ -656,27 +677,46 @@
                                 self.model_list_box["Structure Factors"])
            
-        if self.plugin_rbutton.GetValue():
-            ##fill the comboxbox with form factor list
+        if self.plugin_rbutton.GetValue()and\
+             event.GetEventObject()==self.plugin_rbutton:
+           
+            ##fill the combobox with form factor list
             self.structurebox.Hide()
             self.text2.Hide()
             self.formfactorbox.Clear()
             self._populate_box( self.formfactorbox,
-                                self.model_list_box["Added models"])
+                                self.model_list_box["Customized Models"])
+        
         if not self.multip_cb.GetValue(): 
-            model = self.formfactorbox.GetClientData(0)
+            self.structurebox.Hide()
+            self.text2.Hide()
+            n = self.formfactorbox.GetCurrentSelection()
+            model = self.formfactorbox.GetClientData(n)
             self.model = model()
-            
+        ## user check multiplication option        
         else:
-            ## multplication not available for structure factor
-            if self.struct_rbutton.GetValue():
+            ##for this release 
+            flag1= self.plugin_rbutton.GetValue()or self.struct_rbutton.GetValue()\
+                    or self.shape_indep_rbutton.GetValue()
+            flag2= False   
+             
+            n = self.formfactorbox.GetCurrentSelection()
+            form_factor = self.formfactorbox.GetClientData(n)   
+            ## selecting only multiplication model
+            if self.shape_rbutton.GetValue():
+               if not form_factor in  self.model_list_box["multiplication"]:
+                   flag2 = True
+            ## multiplication not available for structure factor
+            if flag1 or  flag2:
                 self.multip_cb.SetValue(False)
                 self.structurebox.Hide()
+                self.text2.Hide()
                 return
-            ##fill the comboxbox with form factor list
+            ## allow only some to have multiplication
+            
             self.structurebox.Show(True)
             self.text2.Show(True)
-            ## draw multplication  model
-            form_factor = self.formfactorbox.GetClientData(0)
-            struct_factor = self.structurebox.GetClientData(0)
+            ## draw multiplication  model
+            n = self.structurebox.GetCurrentSelection()
+            struct_factor = self.structurebox.GetClientData(n)
             
             from sans.models.MultiplicationModel import MultiplicationModel
@@ -707,4 +747,5 @@
                 combobox.Append(name,models)
         try:
+
             combobox.SetSelection(0)
             
@@ -719,9 +760,20 @@
              call back for model selection
         """
+        ## reset dictionary containing reference to dispersion
+        self._disp_obj_dict = {}
+        self.disp_cb_dict ={}
+        
         f_id = self.formfactorbox.GetCurrentSelection()
         s_id = self.structurebox.GetCurrentSelection()
         form_factor = self.formfactorbox.GetClientData( f_id )
         struct_factor = self.structurebox.GetClientData( s_id )
-       
+        
+        if not form_factor in  self.model_list_box["multiplication"]:
+            self.multip_cb.SetValue(False)
+            self.structurebox.Hide()
+            self.text2.Hide()
+            self.sizer4_4.Clear()
+            self.sizer4.Layout()
+            
         if self.multip_cb.GetValue():
             from sans.models.MultiplicationModel import MultiplicationModel
@@ -796,5 +848,4 @@
                 self.sizer4_4.Clear(True)
                 self._reset_dispersity()
-                self._draw_model()
             
             self.sizer4.Layout()
@@ -817,27 +868,9 @@
         model_disp = wx.StaticText(self, -1, 'No PolyDispersity for this model')
         self.sizer4_4.Add(model_disp,( iy, ix),(1,1),  wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
-        #self.sizer4_4.Layout()
         self.sizer4.Layout()
         self.SetScrollbars(20,20,200,100)
         return 
     
-    def _reset_gaussian_dispers(self):
-        """
-            reset model paramaters to gaussian
-            TO IMPLEMENT
-        """
-        return
-        if self.model==None:
-            return
-        from sans.models.dispersion_models import GaussianDispersion
-        list = self.model.dispersion.keys()
-        
-        for key in list:
-            ## The parameter was un-selected. Go back to Gaussian model (with 0 pts)
-            disp_model = GaussianDispersion()
-            ## Set the new model as the dispersion object for the selected parameter
-            self.model.set_dispersion(key,disp_model)
-            self._draw_model()
-            
+ 
             
     def _reset_dispersity(self):
@@ -847,4 +880,5 @@
         self.fittable_param=[]
         self.fixed_param=[]
+        
         from sans.models.dispersion_models import GaussianDispersion
         if len(self.disp_cb_dict)==0:
@@ -857,10 +891,8 @@
             #TODO: refactor model to clean this up?
             self._disp_obj_dict[p] = disp_model
-            
             # Set the new model as the dispersion object for the selected parameter
             self.model.set_dispersion(p, disp_model)
-            
             # Redraw the model
-            
+            self._draw_model()
             
             
@@ -872,6 +904,5 @@
         dispersity  =event.GetClientData()
         name= dispersity.__name__
-        
-        if name == "GaussianModel":
+        if name == "GaussianDispersion":
             self._set_sizer_gaussian()
             
Index: sansview/perspectives/fitting/fitpage.py
===================================================================
--- sansview/perspectives/fitting/fitpage.py	(revision 1328e03fb2dbb5ff0404eac3502aef46dc24fe5d)
+++ sansview/perspectives/fitting/fitpage.py	(revision 376916c3539d404b91d40c03085a6603a86cae42)
@@ -171,4 +171,5 @@
         self.qmax_x= data_max
         
+        
     def _fill_model_sizer(self, sizer):
         """
@@ -201,7 +202,5 @@
         self.fittable_param=[]
         self.fixed_param=[]
-        ##reset model dispersity to gaussian
-        self._reset_gaussian_dispers()
-        
+    
         self.sizer4_4.Clear(True)
        
@@ -212,4 +211,12 @@
             ## the user didn't select dispersity display
             return 
+        
+        self._reset_dispersity()
+        # Create the dispersion objects
+        for item in self.model.dispersion.keys():
+            disp_model =  GaussianDispersion()
+            self._disp_obj_dict[item] = disp_model
+            self.model.set_dispersion(item, disp_model)
+
         ix=0
         iy=1
@@ -233,4 +240,5 @@
        
         for item in self.model.dispersion.keys():
+            self.disp_cb_dict[item]= None
             name1=item+".width"
             name2=item+".npts"
Index: sansview/perspectives/fitting/modelpage.py
===================================================================
--- sansview/perspectives/fitting/modelpage.py	(revision 1328e03fb2dbb5ff0404eac3502aef46dc24fe5d)
+++ sansview/perspectives/fitting/modelpage.py	(revision 376916c3539d404b91d40c03085a6603a86cae42)
@@ -125,7 +125,5 @@
         self.fittable_param=[]
         self.fixed_param=[]
-        ##reset model dispersity to gaussian
-        self._reset_gaussian_dispers()
-        
+       
         self.sizer4_4.Clear(True)
         if self.model==None:
@@ -135,4 +133,12 @@
             ## the user didn't select dispersity display
             return 
+        self._reset_dispersity()
+        # Create the dispersion objects
+        for item in self.model.dispersion.keys():
+            disp_model =  GaussianDispersion()
+            self._disp_obj_dict[item] = disp_model
+            self.model.set_dispersion(item, disp_model)
+
+        
         ix=0
         iy=1
@@ -153,4 +159,6 @@
         
         for item in self.model.dispersion.keys():
+          
+            self.disp_cb_dict[item]= None
             name1=item+".width"
             name2=item+".npts"
@@ -243,11 +251,5 @@
         self._draw_model()
         ## keep the sizer view consistent with the model menu selecting
-        ##
-        self.structurebox.Hide()
-        self.text2.Hide()
-        self.multip_cb.SetValue(False)
-        
-        if hasattr( model,"model1"):
-            self._set_model_sizer_selection( model )
+        self._set_model_sizer_selection( self.model )
         
         self.model_view.SetFocus()
Index: sansview/perspectives/fitting/models.py
===================================================================
--- sansview/perspectives/fitting/models.py	(revision c77d8592395f6684cf45ee976c1cac9db9c00110)
+++ sansview/perspectives/fitting/models.py	(revision 376916c3539d404b91d40c03085a6603a86cae42)
@@ -103,4 +103,6 @@
     ##list of structure factors 
     struct_list= []
+    ##list of model allowing multiplication
+    multiplication_factor=[]
     ## list of added models
     plugins=[]
@@ -119,8 +121,10 @@
         from sans.models.SphereModel import SphereModel
         self.shape_list.append(SphereModel)
+        self.multiplication_factor.append(SphereModel)
         
         from sans.models.CylinderModel import CylinderModel
         self.shape_list.append(CylinderModel)
-      
+        self.multiplication_factor.append(CylinderModel)
+        
         from sans.models.CoreShellModel import CoreShellModel
         self.shape_list.append(CoreShellModel)
@@ -134,12 +138,10 @@
         from sans.models.EllipsoidModel import EllipsoidModel
         self.shape_list.append(EllipsoidModel)
+        self.multiplication_factor.append(EllipsoidModel)
          
-        from sans.models.LineModel import LineModel
-        self.shape_list.append(LineModel)
+        
         
         ## Structure factor 
-        from sans.models.NoStructure import NoStructure
-        self.struct_list.append(NoStructure)
-        
+      
         from sans.models.SquareWellStructure import SquareWellStructure
         self.struct_list.append(SquareWellStructure)
@@ -170,4 +172,7 @@
         from sans.models.PorodModel import PorodModel
         self.shape_indep_list.append(PorodModel )
+        
+        from sans.models.LineModel import LineModel
+        self.shape_indep_list.append(LineModel)
         
         from sans.models.FractalModel import FractalModel
@@ -218,20 +223,25 @@
         structure_factor = wx.Menu()
         added_models = wx.Menu()
+        multip_models = wx.Menu()
         ## create menu with shape
-        self._fill_menu( menuinfo = ["shapes",shape_submenu," simple shape"],
-                         list1 = self.shape_list,
-                         list2 = self.struct_list )
-        self._fill_menu( menuinfo = ["Shape-independent",shape_indep_submenu,
+        self._fill_simple_menu( menuinfo = ["Shapes",shape_submenu," simple shape"],
+                         list1 = self.shape_list )
+        
+        self._fill_simple_menu( menuinfo = ["Shape-Independent",shape_indep_submenu,
                                     "List of shape-independent models"],
-                         list1 = self.shape_indep_list,
-                         list2 = self.struct_list )
-        self._fill_menu( menuinfo = ["Added models", added_models,
-                                            "List of additional models"],
-                                 list1= self.plugins,
-                                 list2 = self.struct_list)
+                         list1 = self.shape_indep_list )
         
         self._fill_simple_menu( menuinfo= ["Structure Factors",structure_factor,
                                           "List of Structure factors models" ],
                                 list1= self.struct_list )
+        
+        self._fill_simple_menu( menuinfo = ["Customized Models", added_models,
+                                            "List of additional models"],
+                                 list1= self.plugins )
+        
+        self._fill_menu(menuinfo=["P(Q)*S(Q)",multip_models,
+                                  "mulplication of 2 models"],
+                                   list1 = self.multiplication_factor ,
+                                   list2 =  self.struct_list)
         
         
@@ -324,12 +334,10 @@
     def get_model_list(self):    
         """ @ return dictionary of models for fitpanel use """
+        self.model_combobox.set_list("multiplication", self.multiplication_factor)
         return self.model_combobox
     
-    
-    def get_form_struct(self):
-        """ retunr list of form structures"""
-        return self.struct_list
-        
-    
-    
   
+        
+    
+    
+  
