Changeset a321c52 in sasview for src/sas/sasgui/perspectives


Ignore:
Timestamp:
Dec 6, 2016 10:52:56 AM (8 years ago)
Author:
krzywon
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:
9eb8fae
Parents:
77910cf
Message:

Force all models to go through _convert_to_sasmodels routine to ensure all sasmodels version changes are applied.

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

Legend:

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

    r77910cf ra321c52  
    11601160            category_pos = int(state.categorycombobox) 
    11611161        except: 
    1162             if not state._is_sasmodels(): 
    1163                 state._convert_to_sasmodels() 
     1162            state._convert_to_sasmodels() 
    11641163            state.categorycombobox = unicode(state.categorycombobox) 
    11651164            if state.categorycombobox in self.categorybox.Items: 
     
    15921591                        item_page[0].SetValue(item_page_info[0]) 
    15931592                    if item_page[2] is not None: 
    1594                         # TODO: On loading save state, should try to coerce 
    1595                         # TODO: length and scale params to positive values 
    15961593                        item_page[2].SetValue(item_page_info[2]) 
    15971594                        if item_page[2].__class__.__name__ == "ComboBox": 
     
    16091606                        if item_page_info[4][0]: 
    16101607                            item_page[4].Show(True) 
    1611                             item_page[4].SetValue(item_page_info[4][1]) 
     1608                            item_page[4].SetValue(str(item_page_info[4][1])) 
    16121609                        else: 
    16131610                            item_page[3].Hide() 
    16141611                    if item_page[5] is not None: 
    16151612                        # show of hide the text crtl for fitting error 
    1616                         item_page[5].Show(item_page_info[5][0]) 
    1617                         item_page[5].SetValue(item_page_info[5][1]) 
    1618  
     1613                        item_page[5].Show(True) 
     1614                        item_page[5].SetValue(str(item_page_info[5][1])) 
    16191615                    if item_page[6] is not None: 
    16201616                        # show of hide the text crtl for fitting error 
    1621                         item_page[6].Show(item_page_info[6][0]) 
    1622                         item_page[6].SetValue(item_page_info[6][1]) 
    1623  
     1617                        item_page[6].Show(True) 
     1618                        item_page[6].SetValue(str(item_page_info[6][1])) 
    16241619                    break 
    16251620 
  • src/sas/sasgui/perspectives/fitting/pagestate.py

    r1c6bad0 ra321c52  
    357357        return obj 
    358358 
    359     def _is_sasmodels(self): 
     359    def _old_first_model(self): 
    360360        """ 
    361361        A check to see if the loaded save state was saved in SasView v4_0+ 
     
    391391            elif self.categorycombobox == 'Structure Factor': 
    392392                self.formfactorcombobox = 'hardsphere' 
    393         newname = convert._conversion_target(self.formfactorcombobox) 
    394         if newname == None: 
    395             return True 
    396         else: 
    397             return False 
    398393 
    399394    def param_remap_to_sasmodels_convert(self, params): 
     
    466461        """ 
    467462        # Create conversion dictionary to send to sasmodels 
     463        self._old_first_model() 
    468464        p = self.param_remap_to_sasmodels_convert(self.parameters) 
    469465        structurefactor, params = \ 
Note: See TracChangeset for help on using the changeset viewer.