Changeset c1bffa5 in sasview for src/sas/perspectives


Ignore:
Timestamp:
Mar 23, 2015 1:28:37 PM (10 years ago)
Author:
Doucet, Mathieu <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:
701a155, 9dea723
Parents:
bf6b8d1
Message:

This should fix the suggested value buttons.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/perspectives/pr/inversion_panel.py

    r8b21fa7 rc1bffa5  
    696696        try: 
    697697            alpha = self.alpha_estimate_ctl.GetLabel() 
    698             self.alpha_ctl.SetValue(float(alpha)) 
     698            # Check that we have a number 
     699            float(alpha) 
     700            self.alpha_ctl.SetValue(alpha) 
     701        except ValueError: 
     702            logging.error("InversionControl._on_accept_alpha got a value that was not a number: %s" % alpha ) 
    699703        except: 
    700704            # No estimate or bad estimate, either do nothing 
     
    708712        try: 
    709713            nterms = self.nterms_estimate_ctl.GetLabel() 
    710             self.nfunc_ctl.SetValue(float(nterms)) 
     714            # Check that we have a number 
     715            float(nterms) 
     716            self.nfunc_ctl.SetValue(nterms) 
     717        except ValueError: 
     718            logging.error("InversionControl._on_accept_nterms got a value that was not a number: %s" % nterms ) 
    711719        except: 
    712720            # No estimate or bad estimate, either do nothing 
Note: See TracChangeset for help on using the changeset viewer.