Changes in / [063dd44:a8d79fd] in sasview
- Location:
- src/sas/sasgui/perspectives/fitting
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/basepage.py
rb301db9 rb301db9 1449 1449 self.state_change = True 1450 1450 self._draw_model() 1451 # Time delay has been introduced to prevent _handle error1452 # on Windows1453 # This part of code is executed when model is selected and1454 # it's parameters are changed (with respect to previously1455 # selected model). There are two Iq evaluations occuring one1456 # after another and therefore there may be compilation error1457 # if model is calculated for the first time.1458 # This seems to be Windows only issue - haven't tested on Linux1459 # though.The proper solution (other than time delay) requires1460 # more fundemental code refatoring1461 # Wojtek P. Nov 7, 20161462 if not ON_MAC:1463 time.sleep(0.1)1464 1451 self.Refresh() 1465 1452 … … 2609 2596 Layout is called after fitting. 2610 2597 """ 2611 self._sleep4sec()2612 2598 self.Layout() 2613 2599 return 2614 2615 def _sleep4sec(self):2616 """2617 sleep for 1 sec only applied on Mac2618 Note: This 1sec helps for Mac not to crash on self.2619 Layout after self._draw_model2620 """2621 if ON_MAC:2622 time.sleep(1)2623 2600 2624 2601 def _find_polyfunc_selection(self, disp_func=None): -
src/sas/sasgui/perspectives/fitting/fitpage.py
rd85f1d8a rd85f1d8a 1809 1809 self.onSmear(None) 1810 1810 1811 def _mac_sleep(self, sec=0.2):1812 """1813 Give sleep to MAC1814 """1815 if self.is_mac:1816 time.sleep(sec)1817 1818 1811 def get_view_mode(self): 1819 1812 """ … … 2188 2181 self.save_current_state() 2189 2182 2190 if not self.is_mac:2191 self.Layout()2192 self.Refresh()2193 self._mac_sleep(0.1)2194 2183 # plot model ( when drawing, do not update chisqr value again) 2195 2184 self._draw_model(update_chisqr=False, source='fit') -
src/sas/sasgui/perspectives/fitting/fitting.py
r4c5098c r4c5098c 876 876 qmin=qmin, qmax=qmax, weight=weight) 877 877 878 def _mac_sleep(self, sec=0.2):879 """880 Give sleep to MAC881 """882 if ON_MAC:883 time.sleep(sec)884 885 878 def draw_model(self, model, page_id, data=None, smearer=None, 886 879 enable1D=True, enable2D=False, … … 1030 1023 manager=self, 1031 1024 improvement_delta=0.1) 1032 self._mac_sleep(0.2)1033 1025 1034 1026 # batch fit … … 1270 1262 :param elapsed: time spent at the fitting level 1271 1263 """ 1272 self._mac_sleep(0.2)1273 1264 uid = page_id[0] 1274 1265 if uid in self.fit_thread_list.keys(): … … 1520 1511 page_id = [] 1521 1512 ## fit more than 1 model at the same time 1522 self._mac_sleep(0.2)1523 1513 try: 1524 1514 index = 0
Note: See TracChangeset
for help on using the changeset viewer.