Changeset d40038e in sasview for fittingview/src


Ignore:
Timestamp:
Apr 2, 2012 2:00:29 PM (13 years ago)
Author:
Jae Cho <jhjcho@…>
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:
66798ce
Parents:
07dfdb8
Message:

fix: ticket #10

Location:
fittingview/src/sans/perspectives/fitting
Files:
3 edited

Legend:

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

    r1ac202f rd40038e  
    895895        self.state.plugin_rbutton = self.plugin_rbutton.GetValue() 
    896896        #model combobox 
    897         self.state.structurebox = self.structurebox.GetSelection() 
    898         self.state.formfactorbox = self.formfactorbox.GetSelection() 
     897        self.state.structurebox = self.structurebox.GetValue()#.GetSelection() 
     898        self.state.formfactorbox = self.formfactorbox.GetValue()#.GetSelection() 
    899899         
    900900        self.state.enable2D = copy.deepcopy(self.enable2D) 
     
    10601060        self._show_combox_helper() 
    10611061        #select the current model 
    1062         self.formfactorbox.Select(int(state.formfactorcombobox)) 
    1063         self.structurebox.SetSelection(state.structurecombobox ) 
     1062        try: 
     1063            # to support older version 
     1064            formfactor_pos = int(state.formfactorcombobox) 
     1065        except: 
     1066            formfactor_pos = 0 
     1067            for ind_form in range(self.formfactorbox.GetCount()): 
     1068                if self.formfactorbox.GetString(ind_form).count(state.formfactorcombobox)>0: 
     1069                    formfactor_pos = int(ind_form) 
     1070                    break 
     1071             
     1072        self.formfactorbox.Select(formfactor_pos) 
     1073         
     1074        try: 
     1075            # to support older version 
     1076            structfactor_pos = int(state.structurecombobox) 
     1077        except: 
     1078            structfactor_pos = 0 
     1079            for ind_struct in range(self.structurebox.GetCount()): 
     1080                if self.structurebox.GetString(ind_struct).count(state.structurecombobox)>0: 
     1081                    structfactor_pos = int(ind_struct) 
     1082                    break 
     1083                 
     1084        self.structurebox.SetSelection(structfactor_pos) 
     1085         
    10641086        if state.multi_factor != None: 
    10651087            self.multifactorbox.SetSelection(state.multi_factor) 
     
    12061228        self._show_combox_helper() 
    12071229        #select the current model 
    1208         self.formfactorbox.Select(int(state.formfactorcombobox)) 
    1209         self.structurebox.SetSelection(state.structurecombobox ) 
     1230        try: 
     1231            # to support older version 
     1232            formfactor_pos = int(state.formfactorcombobox) 
     1233        except: 
     1234            formfactor_pos = 0 
     1235            for ind_form in range(self.formfactorbox.GetCount()): 
     1236                if self.formfactorbox.GetString(ind_form).count(state.formfactorcombobox)>0: 
     1237                    formfactor_pos = int(ind_form) 
     1238                    break 
     1239             
     1240        self.formfactorbox.Select(formfactor_pos) 
     1241         
     1242        try: 
     1243            # to support older version 
     1244            structfactor_pos = int(state.structurecombobox) 
     1245        except: 
     1246            structfactor_pos = 0 
     1247            for ind_struct in range(self.structurebox.GetCount()): 
     1248                if self.structurebox.GetString(ind_struct).count(state.structurecombobox)>0: 
     1249                    structfactor_pos = int(ind_struct) 
     1250                    break 
     1251             
     1252        self.structurebox.SetSelection(structfactor_pos) 
     1253 
    12101254        if state.multi_factor != None: 
    12111255            self.multifactorbox.SetSelection(state.multi_factor) 
     
    13981442        self.state.struct_rbutton = self.struct_rbutton.GetValue() 
    13991443        self.state.plugin_rbutton = self.plugin_rbutton.GetValue() 
    1400         self.state.structurebox= self.structurebox.GetCurrentSelection() 
    1401         self.state.formfactorbox = self.formfactorbox.GetCurrentSelection() 
     1444        self.state.structurebox= self.structurebox.GetValue()#.GetCurrentSelection() 
     1445        self.state.formfactorbox = self.formfactorbox.GetValue()#.GetCurrentSelection() 
    14021446        
    14031447        #self._undo.Enable(True) 
  • fittingview/src/sans/perspectives/fitting/fitpage.py

    rae56c90 rd40038e  
    12511251        self.state.slit_smearer = self.slit_smearer.GetValue() 
    12521252     
    1253         self.state.structurecombobox = self.structurebox.GetCurrentSelection() 
    1254         self.state.formfactorcombobox = self.formfactorbox.GetCurrentSelection() 
     1253        self.state.structurecombobox = self.structurebox.GetValue()#.GetCurrentSelection() 
     1254        self.state.formfactorcombobox = self.formfactorbox.GetValue()#.GetCurrentSelection() 
    12551255        self.enable_fit_button() 
    12561256        if self.model != None: 
     
    12631263                    self._set_bookmark_flag(True) 
    12641264                    self._keep.Enable(True) 
    1265             #self._set_save_flag(True) 
     1265                    self._set_save_flag(True) 
    12661266            # Reset smearer, model and data 
    12671267            if not copy_flag: 
  • fittingview/src/sans/perspectives/fitting/pagestate.py

    r0483fd48 rd40038e  
    4545                      ["plugin_rbutton", "plugin_rbutton","bool"], 
    4646                      ["struct_rbutton", "struct_rbutton", "bool"], 
    47                       ["formfactorcombobox", "formfactorcombobox", "float"], 
    48                       ["structurecombobox", "structurecombobox", "float"], 
     47                      ["formfactorcombobox", "formfactorcombobox", "string"], 
     48                      ["structurecombobox", "structurecombobox", "string"], 
    4949                      ["multi_factor","multi_factor","float"], 
    5050                      ["enable_smearer","enable_smearer","bool"], 
Note: See TracChangeset for help on using the changeset viewer.