Changeset 12eac73 in sasview
- Timestamp:
- Dec 15, 2009 11:24:30 AM (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:
- 383eeaa
- Parents:
- a6931f5
- Location:
- sansview/perspectives/fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/basepage.py
r6e9976b r12eac73 962 962 self.state_change= True 963 963 self._draw_model() 964 self._sleep4sec()965 self.Layout()966 964 self.Refresh() 967 965 return is_modified … … 1483 1481 wx.PostEvent(self.parent, event) 1484 1482 self.state_change= False 1485 self._sleep4sec() 1486 self.Layout() 1487 self.Refresh() 1483 1488 1484 1489 1485 def _on_select_model_helper(self): … … 1941 1937 self._sleep4sec() 1942 1938 self.Layout() 1943 self._sleep4sec()1939 #self._sleep4sec() 1944 1940 return 1945 1941 1946 1942 def _sleep4sec(self): 1947 1943 """ 1948 sleep for 0.5 sec only on Mac 1944 sleep for 1 sec only applied on Mac 1945 Note: This 1sec helps for Mac not to crash on self.:ayout after self._draw_model 1949 1946 """ 1950 1947 if ON_MAC == True: 1951 time.sleep( 0.5)1948 time.sleep(1) 1952 1949 1953 1950 def on_reset_clicked(self,event): -
sansview/perspectives/fitting/fitpage.py
r6e9976b r12eac73 726 726 wx.PostEvent(self.parent, event) 727 727 self.state_change= False 728 self._sleep4sec() 729 self.Layout() 730 self.Refresh() 731 732 728 729 730 def _onQrangeEnter(self, event): 731 """ 732 Check validity of value enter in the Q range field 733 """ 734 735 tcrtl= event.GetEventObject() 736 #Clear msg if previously shown. 737 msg= "" 738 wx.PostEvent(self.parent.parent, StatusEvent(status = msg )) 739 # Flag to register when a parameter has changed. 740 is_modified = False 741 if tcrtl.GetValue().lstrip().rstrip()!="": 742 try: 743 value = float(tcrtl.GetValue()) 744 tcrtl.SetBackgroundColour(wx.WHITE) 745 746 # If qmin and qmax have been modified, update qmin and qmax 747 if check_value( self.qmin, self.qmax): 748 tempmin = float(self.qmin.GetValue()) 749 if tempmin != self.qmin_x: 750 self.qmin_x = tempmin 751 tempmax = float(self.qmax.GetValue()) 752 if tempmax != self.qmax_x: 753 self.qmax_x = tempmax 754 else: 755 tcrtl.SetBackgroundColour("pink") 756 msg= "Model Error:wrong value entered : %s"% sys.exc_value 757 wx.PostEvent(self.parent.parent, StatusEvent(status = msg )) 758 return 759 760 except: 761 tcrtl.SetBackgroundColour("pink") 762 msg= "Model Error:wrong value entered : %s"% sys.exc_value 763 wx.PostEvent(self.parent.parent, StatusEvent(status = msg )) 764 return 765 #Check if # of points for theory model are valid(>0). 766 if self.npts != None: 767 if check_float(self.npts): 768 temp_npts = float(self.npts.GetValue()) 769 if temp_npts != self.num_points: 770 self.num_points = temp_npts 771 is_modified = True 772 else: 773 msg= "Cannot Plot :No npts in that Qrange!!! " 774 wx.PostEvent(self.parent.parent, StatusEvent(status = msg )) 775 776 else: 777 tcrtl.SetBackgroundColour("pink") 778 msg= "Model Error:wrong value entered!!!" 779 wx.PostEvent(self.parent.parent, StatusEvent(status = msg )) 780 781 self.compute_chisqr() 782 #self._undo.Enable(True) 783 self.save_current_state() 784 event = PageInfoEvent(page = self) 785 wx.PostEvent(self.parent, event) 786 self.state_change= False 787 733 788 def _clear_Err_on_Fit(self): 734 789 """ … … 1013 1068 1014 1069 self.tcChi.SetLabel(str(format_number(output))) 1015 1016 self.sizer5.Layout() 1070 1017 1071 self.state.tcChi =self.tcChi 1018 1072
Note: See TracChangeset
for help on using the changeset viewer.