Ignore:
Timestamp:
Dec 19, 2012 8:23:46 AM (12 years ago)
Author:
Jae Cho <jhjcho@…>
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:
dbc5dc9b
Parents:
5ebdf14
Message:

set the limits of q pix number and q max val

File:
1 edited

Legend:

Unmodified
Added
Removed
  • calculatorview/src/sans/perspectives/calculator/gen_scatter_panel.py

    r5ebdf14 r46be5e6  
    7676        item.Refresh() 
    7777    if show_msg: 
    78         msg = "Error: wrong value entered." 
     78        msg = "Error: wrong (or out of range) value entered." 
    7979        if panel.parent.parent != None: 
    8080            wx.PostEvent(panel.parent.parent,  
     
    758758        try: 
    759759            npt_val = float(self.npt_ctl.GetValue())   
    760             if npt_val < 2: 
     760            if npt_val < 2 or npt_val > 1000: 
    761761                raise 
    762762            self.npt_ctl.SetValue(str(int(npt_val))) 
     
    765765           flag =  _set_error(self, self.npt_ctl) 
    766766        try: 
    767             qmax_val = float(self.qmax_ctl.GetValue())   
    768             if qmax_val <= 0: 
     767            qmax_val = float(self.qmax_ctl.GetValue())  
     768            if qmax_val <= 0 or qmax_val > 1000: 
    769769                raise 
    770770        except: 
Note: See TracChangeset for help on using the changeset viewer.