Ignore:
Timestamp:
Mar 31, 2017 5:20:15 AM (7 years ago)
Author:
wojciech
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.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
7b15990
Parents:
1a8e13f0 (diff), 7cbbacd (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of https://github.com/SasView/sasview into ticket-854

File:
1 edited

Legend:

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

    r1a8e13f0 r5156918  
    5353    ON_MAC = True 
    5454 
     55CUSTOM_MODEL = 'Plugin Models' 
     56 
    5557class BasicPage(ScrolledPanel, PanelBase): 
    5658    """ 
    57     This class provide general structure of fitpanel page 
     59    This class provide general structure of the fitpanel page 
    5860    """ 
    5961    # Internal name for the AUI manager 
     
    118120        self.dxw = None 
    119121        # pinhole smear 
    120         self.dx_min = None 
    121         self.dx_max = None 
     122        self.dx_percent = None 
    122123        # smear attrbs 
    123124        self.enable_smearer = None 
     
    677678    def _copy_info(self, flag): 
    678679        """ 
    679         Send event dpemding on flag 
    680  
    681         : Param flag: flag that distinguish event 
     680        Send event depending on flag 
     681 
     682        : Param flag: flag that distinguishes the event 
    682683        """ 
    683684        # messages depending on the flag 
     
    847848        self.state.pinhole_smearer = \ 
    848849                                copy.deepcopy(self.pinhole_smearer.GetValue()) 
    849         self.state.dx_max = copy.deepcopy(self.dx_max) 
    850         self.state.dx_min = copy.deepcopy(self.dx_min) 
     850        self.state.dx_percent = copy.deepcopy(self.dx_percent) 
    851851        self.state.dxl = copy.deepcopy(self.dxl) 
    852852        self.state.dxw = copy.deepcopy(self.dxw) 
     
    11191119        :precondition: the page is already drawn or created 
    11201120 
    1121         :postcondition: the state of the underlying data change as well as the 
     1121        :postcondition: the state of the underlying data changes as well as the 
    11221122            state of the graphic interface 
    11231123        """ 
     
    11671167        self._show_combox(None) 
    11681168        from models import PLUGIN_NAME_BASE 
    1169         if self.categorybox.GetValue() == 'Customized Models' \ 
     1169        if self.categorybox.GetValue() == CUSTOM_MODEL \ 
    11701170                and PLUGIN_NAME_BASE not in state.formfactorcombobox: 
    11711171            state.formfactorcombobox = \ 
     
    12451245        # we have two more options for smearing 
    12461246        if self.pinhole_smearer.GetValue(): 
    1247             self.dx_min = state.dx_min 
    1248             self.dx_max = state.dx_max 
    1249             if self.dx_min is not None: 
    1250                 self.smear_pinhole_min.SetValue(str(self.dx_min)) 
    1251             if self.dx_max is not None: 
    1252                 self.smear_pinhole_max.SetValue(str(self.dx_max)) 
     1247            self.dx_percent = state.dx_percent 
     1248            if self.dx_percent is not None: 
     1249                if state.dx_old: 
     1250                    self.dx_percent = 100 * (self.dx_percent / self.data.x[0]) 
     1251                self.smear_pinhole_percent.SetValue("%.2f" % self.dx_percent) 
    12531252            self.onPinholeSmear(event=None) 
    12541253        elif self.slit_smearer.GetValue(): 
     
    13351334    def _selectDlg(self): 
    13361335        """ 
    1337         open a dialog file to selected the customized dispersity 
     1336        open a dialog file to select the customized polydispersity function 
    13381337        """ 
    13391338        if self.parent is not None: 
     
    17471746    def _set_multfactor_combobox(self, multiplicity=10): 
    17481747        """ 
    1749         Set comboBox for muitfactor of CoreMultiShellModel 
     1748        Set comboBox for multitfactor of CoreMultiShellModel 
    17501749        :param multiplicit: no. of multi-functionality 
    17511750        """ 
     
    17851784        Fill panel's combo box according to the type of model selected 
    17861785        """ 
    1787         custom_model = 'Customized Models' 
     1786 
    17881787        mod_cat = self.categorybox.GetStringSelection() 
    17891788        self.structurebox.SetSelection(0) 
     
    17941793        m_list = [] 
    17951794        try: 
    1796             if mod_cat == custom_model: 
     1795            if mod_cat == CUSTOM_MODEL: 
    17971796                for model in self.model_list_box[mod_cat]: 
    17981797                    m_list.append(self.model_dict[model.name]) 
     
    34303429        fills out the category list box 
    34313430        """ 
    3432         uncat_str = 'Customized Models' 
     3431        uncat_str = 'Plugin Models' 
    34333432        self._read_category_info() 
    34343433 
     
    34593458        self.model_box.Clear() 
    34603459 
    3461         if category == 'Customized Models': 
     3460        if category == 'Plugin Models': 
    34623461            for model in self.model_list_box[category]: 
    34633462                str_m = str(model).split(".")[0] 
Note: See TracChangeset for help on using the changeset viewer.