Changeset ac166e9c in sasview


Ignore:
Timestamp:
Apr 14, 2009 6:53:29 PM (16 years ago)
Author:
Gervaise Alina <gervyh@…>
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:
7b35808
Parents:
780d095
Message:

checking min and max value

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guiframe/utils.py

    r31f3f661 rac166e9c  
    2828        @param item2: txtcrtl containing the maximum value 
    2929    """ 
    30     mini = float(format_number(item1.GetValue())) 
    31     maxi = float(format_number(item2.GetValue())) 
    32     flag= True 
     30    flag= False 
     31    try: 
     32        mini = float(format_number(item1.GetValue())) 
     33        item1.SetBackgroundColour(wx.WHITE) 
     34        item1.Refresh() 
     35    except: 
     36        flag = False 
     37        item1.SetBackgroundColour("pink") 
     38        item1.Refresh() 
     39        return flag 
     40    try:     
     41        maxi = float(format_number(item2.GetValue())) 
     42        item2.SetBackgroundColour("pink") 
     43        item2.Refresh() 
     44    except: 
     45        flag = False 
     46        item2.SetBackgroundColour("pink") 
     47        item2.Refresh() 
     48        return flag 
     49     
    3350    if mini <  maxi:  
    3451      item1.SetBackgroundColour(wx.WHITE) 
    3552      item1.Refresh() 
     53      item2.SetBackgroundColour(wx.WHITE) 
     54      item2.Refresh() 
     55      flag = True 
    3656    else: 
    3757        flag = False 
Note: See TracChangeset for help on using the changeset viewer.