Changeset e92a352 in sasview


Ignore:
Timestamp:
Feb 5, 2017 10:47:14 PM (8 years ago)
Author:
butler
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
11b094f
Parents:
2ab9c432
Message:

replace "Customized Models" with Plugin Models in category lists.
However category manager remains unaware of plugins. Unlike built ins,
plugins list needs to be constantly updated.

Location:
src/sas/sasgui/perspectives/fitting
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/fitting/basepage.py

    r505706a re92a352  
    5555class BasicPage(ScrolledPanel, PanelBase): 
    5656    """ 
    57     This class provide general structure of fitpanel page 
     57    This class provide general structure of the fitpanel page 
    5858    """ 
    5959    # Internal name for the AUI manager 
     
    677677    def _copy_info(self, flag): 
    678678        """ 
    679         Send event dpemding on flag 
    680  
    681         : Param flag: flag that distinguish event 
     679        Send event depending on flag 
     680 
     681        : Param flag: flag that distinguishes the event 
    682682        """ 
    683683        # messages depending on the flag 
     
    11161116        :precondition: the page is already drawn or created 
    11171117 
    1118         :postcondition: the state of the underlying data change as well as the 
     1118        :postcondition: the state of the underlying data changes as well as the 
    11191119            state of the graphic interface 
    11201120        """ 
     
    13421342    def _selectDlg(self): 
    13431343        """ 
    1344         open a dialog file to selected the customized dispersity 
     1344        open a dialog file to select the customized polydispersity function 
    13451345        """ 
    13461346        if self.parent is not None: 
     
    17641764    def _set_multfactor_combobox(self, multiplicity=10): 
    17651765        """ 
    1766         Set comboBox for muitfactor of CoreMultiShellModel 
     1766        Set comboBox for multitfactor of CoreMultiShellModel 
    17671767        :param multiplicit: no. of multi-functionality 
    17681768        """ 
     
    18021802        Fill panel's combo box according to the type of model selected 
    18031803        """ 
    1804         custom_model = 'Customized Models' 
     1804        custom_model = 'Plugin Models' 
    18051805        mod_cat = self.categorybox.GetStringSelection() 
    18061806        self.structurebox.SetSelection(0) 
     
    34573457        fills out the category list box 
    34583458        """ 
    3459         uncat_str = 'Customized Models' 
     3459        uncat_str = 'Plugin Models' 
    34603460        self._read_category_info() 
    34613461 
     
    34863486        self.model_box.Clear() 
    34873487 
    3488         if category == 'Customized Models': 
     3488        if category == 'Plugin Models': 
    34893489            for model in self.model_list_box[category]: 
    34903490                str_m = str(model).split(".")[0] 
  • src/sas/sasgui/perspectives/fitting/fitting.py

    r73cbeec re92a352  
    225225 
    226226        self.id_edit = wx.NewId() 
    227         editmodel_help = "Edit customized model sample file" 
    228227        self.menu1.AppendMenu(self.id_edit, "Plugin Model Operations", 
    229                               self.edit_model_menu, editmodel_help) 
     228                              self.edit_model_menu) 
    230229        #create  menubar items 
    231230        return [(self.menu1, self.sub_menu)] 
     
    260259            self.update_custom_combo() 
    261260            if os.path.isfile(p_path): 
    262                 msg = "Sorry! Could not be able to delete the default " 
    263                 msg += "custom model... \n" 
     261                msg = "Sorry! unable to delete the default " 
     262                msg += "plugin model... \n" 
    264263                msg += "Please manually remove the files (.py, .pyc) " 
    265264                msg += "in the 'plugin_models' folder \n" 
     
    274273                    if item.GetLabel() == label: 
    275274                        self.edit_menu.DeleteItem(item) 
    276                         msg = "The custom model, %s, has been deleted." % label 
     275                        msg = "The plugin model, %s, has been deleted." % label 
    277276                        evt = StatusEvent(status=msg, type='stop', info='info') 
    278277                        wx.PostEvent(self.parent, evt) 
     
    331330            temp = self.fit_panel.reset_pmodel_list() 
    332331            if temp: 
    333                 # Set the new custom model list for all fit pages 
     332                # Set the new plugin model list for all fit pages 
    334333                for uid, page in self.fit_panel.opened_pages.iteritems(): 
    335334                    if hasattr(page, "formfactorbox"): 
  • src/sas/sasgui/perspectives/fitting/models.py

    r313c5c9 re92a352  
    324324                    self.plugins.append(plug) 
    325325                    self.model_dictionary[name] = plug 
    326             self.model_combobox.set_list("Customized Models", self.plugins) 
     326            self.model_combobox.set_list("Plugin Models", self.plugins) 
    327327            return self.model_combobox.get_list() 
    328328        else: 
     
    345345            self.model_dictionary[name] = plug 
    346346 
    347         self.model_combobox.reset_list("Customized Models", self.plugins) 
     347        self.model_combobox.reset_list("Plugin Models", self.plugins) 
    348348        return self.model_combobox.get_list() 
    349349 
     
    388388#                                     self.shape_indep_list) 
    389389        self.model_combobox.set_list("Structure Factors", self.struct_list) 
    390         self.model_combobox.set_list("Customized Models", self.plugins) 
     390        self.model_combobox.set_list("Plugin Models", self.plugins) 
    391391        self.model_combobox.set_list("P(Q)*S(Q)", self.multiplication_factor) 
    392392        self.model_combobox.set_list("multiplication", 
Note: See TracChangeset for help on using the changeset viewer.