Changeset 69bee6d in sasview for sansview/perspectives/fitting/basepage.py
- Timestamp:
- Apr 14, 2009 7:57:49 PM (15 years ago)
- 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:
- 74ad4b1
- Parents:
- 7b35808
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/basepage.py
r780d095 r69bee6d 5 5 import time 6 6 7 from sans.guiframe.utils import format_number 7 from sans.guiframe.utils import format_number,check_float 8 8 from sans.guicomm.events import StatusEvent 9 9 import pagestate … … 565 565 # If qmin and qmax have been modified, update qmin and qmax and 566 566 # set the is_modified flag to True 567 from sans.guiframe.utils import check_value 567 from sans.guiframe.utils import check_value 568 568 if check_value( self.qmin, self.qmax): 569 569 if float(self.qmin.GetValue()) != self.qmin_x: … … 577 577 self.fitrange = False 578 578 if self.npts != None: 579 if float(self.npts.GetValue()) != self.num_points: 580 self.num_points = float(self.npts.GetValue()) 581 is_modified = True 582 579 if check_float(self.npts): 580 if float(self.npts.GetValue()) != self.num_points: 581 self.num_points = float(self.npts.GetValue()) 582 is_modified = True 583 else: 584 msg= "Cannot Plot :Must enter a number!!! " 585 wx.PostEvent(self.parent.parent, StatusEvent(status = msg )) 586 583 587 584 588 ## if any value is modify draw model with new value … … 988 992 when enter value on panel redraw model according to changed 989 993 """ 990 self._onparamEnter_helper() 994 tcrtl= event.GetEventObject() 995 if check_float(tcrtl): 996 self._onparamEnter_helper() 997 else: 998 msg= "Cannot Plot :Must enter a number!!! " 999 wx.PostEvent(self.parent.parent, StatusEvent(status = msg )) 1000 return 991 1001 992 1002 … … 1034 1044 item[4].Clear() 1035 1045 item[4].Hide() 1046 1047 1048 value= float(item[2].GetValue()) 1036 1049 1037 value= float(item[2].GetValue())1038 1050 # If the value of the parameter has changed, 1039 1051 # +update the model and set the is_modified flag 1040 1052 if value != self.model.getParam(name): 1041 1053 self.model.setParam(name,value) 1042 is_modified = True 1054 is_modified = True 1055 1043 1056 except: 1044 1057 msg= "Model Drawing Error:wrong value entered : %s"% sys.exc_value
Note: See TracChangeset
for help on using the changeset viewer.