- Timestamp:
- Feb 21, 2017 3:40:52 PM (8 years ago)
- 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:
- ef2cdb3, 7a5aedd
- Parents:
- 11b094f
- Location:
- src/sas/sasgui/perspectives/fitting
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/basepage.py
r11b094f r4387385 52 52 FONT_VARIANT = 1 53 53 ON_MAC = True 54 55 CUSTOM_MODEL = 'Plugin Models' 56 CUSTOM_MODEL_OLD = 'Customized Models' 54 57 55 58 class BasicPage(ScrolledPanel, PanelBase): … … 1156 1159 # select the current model 1157 1160 state._convert_to_sasmodels() 1161 if state.categorycombobox == CUSTOM_MODEL_OLD: 1162 state.categorycombobox = CUSTOM_MODEL 1158 1163 state.categorycombobox = unicode(state.categorycombobox) 1159 1164 if state.categorycombobox in self.categorybox.Items: … … 1167 1172 self._show_combox(None) 1168 1173 from models import PLUGIN_NAME_BASE 1169 if self.categorybox.GetValue() == 'Customized Models'\1174 if self.categorybox.GetValue() == CUSTOM_MODEL \ 1170 1175 and PLUGIN_NAME_BASE not in state.formfactorcombobox: 1171 1176 state.formfactorcombobox = \ … … 1798 1803 Fill panel's combo box according to the type of model selected 1799 1804 """ 1800 custom_model = 'Plugin Models' 1805 1801 1806 mod_cat = self.categorybox.GetStringSelection() 1802 1807 self.structurebox.SetSelection(0) … … 1807 1812 m_list = [] 1808 1813 try: 1809 if mod_cat == custom_model:1814 if mod_cat == CUSTOM_MODEL: 1810 1815 for model in self.model_list_box[mod_cat]: 1811 1816 m_list.append(self.model_dict[model.name]) -
src/sas/sasgui/perspectives/fitting/fitpage.py
ra6fccd7 r4387385 31 31 SMEAR_SIZE_L = 0.00 32 32 SMEAR_SIZE_H = 0.00 33 33 CUSTOM_MODEL = 'Plugin Models' 34 34 35 35 class FitPage(BasicPage): … … 1249 1249 wx.PostEvent(self.parent, new_event) 1250 1250 # update list of plugins if new plugin is available 1251 custom_model = 'Customized Models'1251 custom_model = CUSTOM_MODEL 1252 1252 mod_cat = self.categorybox.GetStringSelection() 1253 1253 if mod_cat == custom_model: -
src/sas/sasgui/perspectives/fitting/pagestate.py
r6d2b50b r4387385 33 33 from sas.sascalc.dataloader.data_info import Data2D, Collimation, Detector 34 34 from sas.sascalc.dataloader.data_info import Process, Aperture 35 35 36 # Information to read/write state as xml 36 37 FITTING_NODE_NAME = 'fitting_plug_in' 37 38 CANSAS_NS = "cansas1d/1.0" 39 40 CUSTOM_MODEL = 'Plugin Models' 41 CUSTOM_MODEL_OLD = 'Customized Models' 38 42 39 43 LIST_OF_DATA_ATTRIBUTES = [["is_data", "is_data", "bool"], … … 378 382 'Sphere' : 'adsorbed_layer', 379 383 'Structure Factor' : 'hardsphere', 380 'Customized Models' : '' 384 CUSTOM_MODEL_OLD : '', 385 CUSTOM_MODEL : '' 381 386 } 382 387 if self.categorycombobox == '':
Note: See TracChangeset
for help on using the changeset viewer.