Changeset 9e11cf5 in sasview


Ignore:
Timestamp:
Feb 14, 2015 10:25:14 AM (9 years ago)
Author:
gonzalezm
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:
827484cf
Parents:
109e50bb
Message:

Bug fix for ticket 320 - NaN errors are now displayed in the error boxes instead of making the box disappear

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/perspectives/fitting/fitpage.py

    rb9a5f0e r9e11cf5  
    14921492        after fitting 
    14931493        """ 
     1494 
    14941495        if self.is_mac: 
    14951496            return 
     
    15001501            for item in self.parameters: 
    15011502                if item[0].IsShown(): 
    1502                     #Skip t ifhe angle parameters if 1D data 
     1503                    #Skip the angle parameters if 1D data 
    15031504                    if self.data.__class__.__name__ != "Data2D" and \ 
    15041505                            not self.enable2D: 
     
    15191520            for item in self.fittable_param: 
    15201521                if item[0].IsShown(): 
    1521                     #Skip t ifhe angle parameters if 1D data 
     1522                    #Skip the angle parameters if 1D data 
    15221523                    if self.data.__class__.__name__ != "Data2D" and \ 
    15231524                            not self.enable2D: 
     
    20762077    
    20772078        """ 
     2079         
    20782080        # make sure stop button to fit button all the time 
    20792081        self._on_fit_complete() 
     
    21122114        i = 0 
    21132115        #Set the panel when fit result are list 
     2116 
    21142117        for item in self.param_toFit: 
    21152118            if len(item) > 5 and item != None: 
     2119 
    21162120                if item[0].IsShown(): 
    21172121                    ## reset error value to initial state 
     
    21442148                                    item[3].Show(True) 
    21452149                                    item[4].Show(True) 
     2150                                    item[4].SetForegroundColour(wx.BLACK) 
     2151                                item[4].SetValue(val_err) 
     2152                                has_error = True 
     2153                            else: 
     2154                                val_err = 'NaN' 
     2155                                if not self.is_mac: 
     2156                                    item[3].Show(True) 
     2157                                    item[4].Show(True) 
     2158                                    item[4].SetForegroundColour(wx.RED) 
    21462159                                item[4].SetValue(val_err) 
    21472160                                has_error = True 
     
    28312844            
    28322845        keys = self.model.getParamList() 
    2833         #list of dispersion paramaters 
     2846         
     2847        #list of dispersion parameters 
    28342848        self.disp_list = self.model.getDispParamList() 
    28352849 
     
    29252939        CHECK_STATE = self.cb1.GetValue() 
    29262940        for item in keys: 
     2941             
    29272942            if not item in self.disp_list and not item in \ 
    29282943                    self.model.orientation_params: 
Note: See TracChangeset for help on using the changeset viewer.