Changeset 766629a in sasview for src/sas/sasgui/perspectives/fitting
- Timestamp:
- Nov 8, 2016 2:59:26 AM (8 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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- df43ee2
- Parents:
- cc0f4a8 (diff), b0e0183 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - git-author:
- wpotrzebowski <Wojciech.Potrzebowski@…> (11/08/16 02:53:27)
- git-committer:
- wpotrzebowski <Wojciech.Potrzebowski@…> (11/08/16 02:59:26)
- Location:
- src/sas/sasgui/perspectives/fitting
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/basepage.py
rc8e1996 rcc0f4a8 52 52 FONT_VARIANT = 1 53 53 ON_MAC = True 54 55 54 56 55 class BasicPage(ScrolledPanel, PanelBase): … … 1457 1456 self.state_change = True 1458 1457 self._draw_model() 1458 # Time delay has been introduced to prevent _handle error 1459 # on Windows 1460 # This part of code is executed when model is selected and 1461 # it's parameters are changed (with respect to previously 1462 # selected model). There are two evaluations of Iq occuring one 1463 # after another and therefore there may be compilation error 1464 # if model is calculted for the first time. 1465 # The proper solution (other than time delay) requires more 1466 # fundemental code refatoring 1467 # Wojtek P. Nov 7, 2016 1468 if not ON_MAC: 1469 time.sleep(0.1) 1459 1470 self.Refresh() 1460 1471 … … 2391 2402 2392 2403 # Redraw the model 2393 self._draw_model() 2404 # Wojtek P. Nov 7, 2016: Redrawing seems to be unnecessary here 2405 # self._draw_model() 2394 2406 # self._undo.Enable(True) 2395 2407 event = PageInfoEvent(page=self) -
src/sas/sasgui/perspectives/fitting/fitpage.py
rc8e1996 rbf44249e 81 81 flag = check_data_validity(self.data) & (self.model is not None) 82 82 self.btFit.Enable(flag) 83 83 84 84 def on_set_focus(self, event): 85 85 """ 86 Override the basepage focus method to ensure the save flag is set 86 Override the basepage focus method to ensure the save flag is set 87 87 properly when focusing on the fit page. 88 88 """ … … 238 238 239 239 weighting_set_box = wx.StaticBox(self, wx.ID_ANY, 240 'Set Weighting by Selecting dI Source')240 'Set Weighting by Selecting dI Source') 241 241 weighting_box = wx.StaticBoxSizer(weighting_set_box, wx.HORIZONTAL) 242 242 sizer_weighting = wx.BoxSizer(wx.HORIZONTAL) … … 1164 1164 if event is not None: 1165 1165 if (event.GetEventObject() == self.formfactorbox 1166 1167 1168 1166 and self.structurebox.GetLabel() != 'None')\ 1167 or event.GetEventObject() == self.structurebox\ 1168 or event.GetEventObject() == self.multifactorbox: 1169 1169 copy_flag = self.get_copy_params() 1170 1170 is_poly_enabled = self.enable_disp.GetValue() … … 1205 1205 self._keep.Enable(not self.batch_on) 1206 1206 self._set_save_flag(True) 1207 self._set_smear(self.data) 1207 #Setting smearing for cases with and without data. 1208 self._set_smear(self.data) 1208 1209 1209 1210 # more disables for 2D … … 1212 1213 try: 1213 1214 # update smearer sizer 1214 self.onSmear(None) 1215 #This call for smearing set up caused double evaluation of 1216 #I(q) and double compilation as results 1217 #self.onSmear(None) 1215 1218 temp_smear = None 1216 1219 if not self.disable_smearer.GetValue(): … … 1226 1229 # set smearing value whether or not data contain the smearing info 1227 1230 evt = ModelEventbox(model=self.model, 1228 smearer=temp_smear,1229 enable_smearer=not self.disable_smearer.GetValue(),1230 qmin=float(self.qmin_x),1231 uid=self.uid,1232 caption=self.window_caption,1233 qmax=float(self.qmax_x))1231 smearer=temp_smear, 1232 enable_smearer=not self.disable_smearer.GetValue(), 1233 qmin=float(self.qmin_x), 1234 uid=self.uid, 1235 caption=self.window_caption, 1236 qmax=float(self.qmax_x)) 1234 1237 1235 1238 self._manager._on_model_panel(evt=evt) -
src/sas/sasgui/perspectives/fitting/fitting.py
rec72ceb re0d9ed2 864 864 enable1D=enable1D, enable2D=enable2D, 865 865 qmin=qmin, qmax=qmax, weight=weight) 866 self._mac_sleep(0.2)867 866 868 867 def _mac_sleep(self, sec=0.2): … … 1966 1965 ## May need rethinking 1967 1966 ## 1968 ## -PDB August 12, 2014 1967 ## -PDB August 12, 2014 1969 1968 while self.calc_1D.isrunning(): 1970 1969 time.sleep(0.1)
Note: See TracChangeset
for help on using the changeset viewer.