Changes in / [5156918:7cbbacd] 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 error 1452 # on Windows 1453 # This part of code is executed when model is selected and 1454 # it's parameters are changed (with respect to previously 1455 # selected model). There are two Iq evaluations occuring one 1456 # after another and therefore there may be compilation error 1457 # if model is calculated for the first time. 1458 # This seems to be Windows only issue - haven't tested on Linux 1459 # though.The proper solution (other than time delay) requires 1460 # more fundemental code refatoring 1461 # Wojtek P. Nov 7, 2016 1462 if not ON_MAC: 1463 time.sleep(0.1) 1451 1464 self.Refresh() 1452 1465 … … 2596 2609 Layout is called after fitting. 2597 2610 """ 2611 self._sleep4sec() 2598 2612 self.Layout() 2599 2613 return 2614 2615 def _sleep4sec(self): 2616 """ 2617 sleep for 1 sec only applied on Mac 2618 Note: This 1sec helps for Mac not to crash on self. 2619 Layout after self._draw_model 2620 """ 2621 if ON_MAC: 2622 time.sleep(1) 2600 2623 2601 2624 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 MAC 1814 """ 1815 if self.is_mac: 1816 time.sleep(sec) 1817 1811 1818 def get_view_mode(self): 1812 1819 """ … … 2181 2188 self.save_current_state() 2182 2189 2190 if not self.is_mac: 2191 self.Layout() 2192 self.Refresh() 2193 self._mac_sleep(0.1) 2183 2194 # plot model ( when drawing, do not update chisqr value again) 2184 2195 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 MAC 881 """ 882 if ON_MAC: 883 time.sleep(sec) 884 878 885 def draw_model(self, model, page_id, data=None, smearer=None, 879 886 enable1D=True, enable2D=False, … … 1023 1030 manager=self, 1024 1031 improvement_delta=0.1) 1032 self._mac_sleep(0.2) 1025 1033 1026 1034 # batch fit … … 1262 1270 :param elapsed: time spent at the fitting level 1263 1271 """ 1272 self._mac_sleep(0.2) 1264 1273 uid = page_id[0] 1265 1274 if uid in self.fit_thread_list.keys(): … … 1511 1520 page_id = [] 1512 1521 ## fit more than 1 model at the same time 1522 self._mac_sleep(0.2) 1513 1523 try: 1514 1524 index = 0
Note: See TracChangeset
for help on using the changeset viewer.