Changeset db5294e in sasview for src


Ignore:
Timestamp:
Nov 18, 2016 1:49:36 PM (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:
406644a
Parents:
8898558b
Message:

#795: Small fix to invariant to check for None type when loading values. Working toward loading rpa and coreshellellipsoid integration.

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

Legend:

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

    r8898558b rdb5294e  
    11061106        """ 
    11071107        for key, value in self.master_category_dict.iteritems(): 
     1108            formfactor = state.formfactorcombobox.split(":") 
     1109            if isinstance(formfactor, list): 
     1110                formfactor = formfactor[0] 
    11081111            for list_item in value: 
    1109                 if state.formfactorcombobox in list_item: 
     1112                if formfactor in list_item: 
    11101113                    return self.categorybox.Items.index(key) 
    11111114        return 0 
  • src/sas/sasgui/perspectives/invariant/invariant_state.py

    rcb93b40 rdb5294e  
    423423                    for item in DEFAULT_STATE: 
    424424                        input_field = get_content('ns:%s' % item, entry) 
    425                         val = str(input_field.text.strip()) 
     425                        if input_field.text is not None: 
     426                            val = str(input_field.text.strip()) 
     427                        else: 
     428                            val = '' 
    426429                        if input_field is not None: 
    427430                            temp_state[item] = val 
     
    433436                for item in DEFAULT_STATE: 
    434437                    input_field = get_content('ns:%s' % item, entry) 
    435                     val = str(input_field.text.strip()) 
     438                    if input_field.text is not None: 
     439                        val = str(input_field.text.strip()) 
     440                    else: 
     441                        val = '' 
    436442                    if input_field is not None: 
    437443                        self.set_saved_state(name=item, value=val) 
Note: See TracChangeset for help on using the changeset viewer.