- Timestamp:
- Feb 14, 2017 3:45:01 PM (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.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 5156918
- Parents:
- 2510b9b
- Location:
- src/sas/sasgui/perspectives/fitting
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/basepage.py
ra6fccd7 r1a8e13f0 1450 1450 self.state_change = True 1451 1451 self._draw_model() 1452 # Time delay has been introduced to prevent _handle error1453 # on Windows1454 # This part of code is executed when model is selected and1455 # it's parameters are changed (with respect to previously1456 # selected model). There are two Iq evaluations occuring one1457 # after another and therefore there may be compilation error1458 # if model is calculated for the first time.1459 # This seems to be Windows only issue - haven't tested on Linux1460 # though.The proper solution (other than time delay) requires1461 # more fundemental code refatoring1462 # Wojtek P. Nov 7, 20161463 if not ON_MAC:1464 time.sleep(0.1)1465 1452 self.Refresh() 1466 1453 … … 2610 2597 Layout is called after fitting. 2611 2598 """ 2612 self._sleep4sec()2613 2599 self.Layout() 2614 2600 return 2615 2616 def _sleep4sec(self):2617 """2618 sleep for 1 sec only applied on Mac2619 Note: This 1sec helps for Mac not to crash on self.2620 Layout after self._draw_model2621 """2622 if ON_MAC:2623 time.sleep(1)2624 2601 2625 2602 def _find_polyfunc_selection(self, disp_func=None): -
src/sas/sasgui/perspectives/fitting/fitpage.py
ra6fccd7 r1a8e13f0 1830 1830 self.onSmear(None) 1831 1831 1832 def _mac_sleep(self, sec=0.2):1833 """1834 Give sleep to MAC1835 """1836 if self.is_mac:1837 time.sleep(sec)1838 1839 1832 def get_view_mode(self): 1840 1833 """ … … 2196 2189 self.save_current_state() 2197 2190 2198 if not self.is_mac:2199 self.Layout()2200 self.Refresh()2201 self._mac_sleep(0.1)2202 2191 # plot model ( when drawing, do not update chisqr value again) 2203 2192 self._draw_model(update_chisqr=False, source='fit') -
src/sas/sasgui/perspectives/fitting/fitting.py
r73cbeec r1a8e13f0 877 877 qmin=qmin, qmax=qmax, weight=weight) 878 878 879 def _mac_sleep(self, sec=0.2):880 """881 Give sleep to MAC882 """883 if ON_MAC:884 time.sleep(sec)885 886 879 def draw_model(self, model, page_id, data=None, smearer=None, 887 880 enable1D=True, enable2D=False, … … 1031 1024 manager=self, 1032 1025 improvement_delta=0.1) 1033 self._mac_sleep(0.2)1034 1026 1035 1027 # batch fit … … 1271 1263 :param elapsed: time spent at the fitting level 1272 1264 """ 1273 self._mac_sleep(0.2)1274 1265 uid = page_id[0] 1275 1266 if uid in self.fit_thread_list.keys(): … … 1521 1512 page_id = [] 1522 1513 ## fit more than 1 model at the same time 1523 self._mac_sleep(0.2)1524 1514 try: 1525 1515 index = 0
Note: See TracChangeset
for help on using the changeset viewer.