Changeset 35c9d31 in sasview
- Timestamp:
- Nov 13, 2009 12:12:43 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:
- c13b8cc
- Parents:
- c69b6d5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/basepage.py
rc69b6d5 r35c9d31 21 21 PANEL_WIDTH = 450 22 22 FONT_VARIANT = 0 23 ON_MAC = False 23 24 else: 24 25 PANEL_WIDTH = 500 25 26 FONT_VARIANT = 1 27 ON_MAC = True 26 28 27 29 class BasicPage(wx.ScrolledWindow): … … 171 173 self.Bind(wx.EVT_TEXT_ENTER, parent._onparamEnter \ 172 174 if text_enter_callback is None else text_enter_callback) 173 self.Bind(wx.EVT_LEFT_UP, self._highlight_text \ 174 if mouse_up_callback is None else mouse_up_callback) 175 if not ON_MAC : 176 self.Bind(wx.EVT_LEFT_UP, self._highlight_text \ 177 if mouse_up_callback is None else mouse_up_callback) 175 178 176 179 def _on_set_focus(self, event): … … 180 183 @param event: mouse event 181 184 """ 185 182 186 event.Skip() 183 187 self.full_selection = True 184 188 return self._on_set_focus_callback(event) 185 189 190 191 186 192 def _highlight_text(self, event): 187 193 """ … … 1000 1006 self.state_change= True 1001 1007 self._draw_model() 1002 1008 1009 def _update_paramv_on_fit(self): 1010 """ 1011 make sure that update param values just before the fitting 1012 """ 1013 from sans.guiframe.utils import check_value 1014 #flag for qmin qmax check values 1015 flag =False 1016 is_modified = False 1017 ##So make sure that update param values on_Fit. 1018 #self._undo.Enable(True) 1019 if self.model !=None: 1020 ##Check the values 1021 self._check_value_enter( self.fittable_param ,is_modified) 1022 self._check_value_enter( self.fixed_param ,is_modified) 1023 self._check_value_enter( self.parameters ,is_modified) 1024 1025 # If qmin and qmax have been modified, update qmin and qmax and 1026 if check_value( self.qmin, self.qmax): 1027 if float(self.qmin.GetValue()) != self.qmin_x: 1028 self.qmin_x = float(self.qmin.GetValue()) 1029 1030 if float(self.qmax.GetValue()) != self.qmax_x: 1031 self.qmax_x = float(self.qmax.GetValue()) 1032 flag = True 1033 1034 if self.npts != None: 1035 if check_float(self.npts): 1036 if float(self.npts.GetValue()) != self.num_points: 1037 self.num_points = float(self.npts.GetValue()) 1038 1039 else: 1040 msg= "Cannot Fit :Must select a model!!! " 1041 wx.PostEvent(self.parent.parent, StatusEvent(status = msg )) 1042 1043 return flag 1003 1044 1004 1045 def _is_modified(self, is_modified): … … 1515 1556 self.model.details[name][1:]= param_min,param_max 1516 1557 1517 1518 ## hide statictext +/-1519 #if item[3]!=None and item[3].IsShown():1520 # item[3].Hide()1521 ## hide textcrtl for error after fit1522 #if item[4]!=None and item[4].IsShown():1523 # item[4].Clear()1524 # item[4].Hide()1525 1526 1558 value= float(item[2].GetValue()) 1527 1559
Note: See TracChangeset
for help on using the changeset viewer.