Ignore:
Timestamp:
May 19, 2012 10:17:02 AM (12 years ago)
Author:
Mathieu Doucet <doucetm@…>
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, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
baa915c
Parents:
d225e32
Message:

Merge 2.1.1 into trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fittingview/src/sans/perspectives/fitting/basepage.py

    r19e614a r940aca7  
    113113        self.enable2D = False 
    114114        self.is_mac = ON_MAC 
    115          
     115        self.formfactorbox = None 
     116        self.structurebox = None 
    116117        ##list of model parameters. each item must have same length 
    117118        ## each item related to a given parameters 
     
    882883            self.state.disp_list = copy.deepcopy(self.disp_list) 
    883884            self.state.model = self.model.clone() 
     885             
     886            #model combobox: complex code because of mac's silent error 
     887            if self.structurebox != None: 
     888                if self.structurebox.IsShown(): 
     889                    self.state.structurecombobox = 'None' 
     890                    s_select = self.structurebox.GetSelection() 
     891                    if s_select > 0: 
     892                        self.state.structurecombobox = self.structurebox.\ 
     893                        GetString(s_select) 
     894            if self.formfactorbox != None: 
     895                f_select = self.formfactorbox.GetSelection() 
     896                if f_select > 0: 
     897                        self.state.formfactorcombobox = self.formfactorbox.\ 
     898                        GetString(f_select) 
     899                         
    884900        #save radiobutton state for model selection 
    885901        self.state.shape_rbutton = self.shape_rbutton.GetValue() 
     
    887903        self.state.struct_rbutton = self.struct_rbutton.GetValue() 
    888904        self.state.plugin_rbutton = self.plugin_rbutton.GetValue() 
    889         #model combobox 
    890         self.state.structurebox = self.structurebox.GetLabel() 
    891         self.state.formfactorbox = self.formfactorbox.GetLabel() 
    892905         
    893906        self.state.enable2D = copy.deepcopy(self.enable2D) 
     
    12311244            structfactor_pos = 0 
    12321245            for ind_struct in range(self.structurebox.GetCount()): 
    1233                 if self.structurebox.GetString(ind_struct) == (state.structurecombobox) > 0: 
     1246                if self.structurebox.GetString(ind_struct) == (state.structurecombobox): 
    12341247                    structfactor_pos = int(ind_struct) 
    12351248                    break 
     
    14281441        self.state.struct_rbutton = self.struct_rbutton.GetValue() 
    14291442        self.state.plugin_rbutton = self.plugin_rbutton.GetValue() 
    1430         self.state.structurebox = self.structurebox.GetLabel() 
    1431         self.state.formfactorbox = self.formfactorbox.GetLabel() 
     1443        self.state.structurecombobox = self.structurebox.GetLabel() 
     1444        self.state.formfactorcombobox = self.formfactorbox.GetLabel() 
    14321445        
    14331446        ## post state to fit panel 
Note: See TracChangeset for help on using the changeset viewer.