Changeset 1a8e13f0 in sasview for src/sas/sasgui


Ignore:
Timestamp:
Feb 14, 2017 3:45:01 PM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
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
Message:

remove unnecessary sleep

Location:
src/sas/sasgui/perspectives/fitting
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/fitting/basepage.py

    ra6fccd7 r1a8e13f0  
    14501450                self.state_change = True 
    14511451                self._draw_model() 
    1452                 # Time delay has been introduced to prevent _handle error 
    1453                 # on Windows 
    1454                 # This part of code is executed when model is selected and 
    1455                 # it's parameters are changed (with respect to previously 
    1456                 # selected model). There are two Iq evaluations occuring one 
    1457                 # after another and therefore there may be compilation error 
    1458                 # if model is calculated for the first time. 
    1459                 # This seems to be Windows only issue - haven't tested on Linux 
    1460                 # though.The proper solution (other than time delay) requires 
    1461                 # more fundemental code refatoring 
    1462                 # Wojtek P. Nov 7, 2016 
    1463                 if not ON_MAC: 
    1464                     time.sleep(0.1) 
    14651452                self.Refresh() 
    14661453 
     
    26102597            Layout is called after fitting. 
    26112598        """ 
    2612         self._sleep4sec() 
    26132599        self.Layout() 
    26142600        return 
    2615  
    2616     def _sleep4sec(self): 
    2617         """ 
    2618             sleep for 1 sec only applied on Mac 
    2619             Note: This 1sec helps for Mac not to crash on self. 
    2620             Layout after self._draw_model 
    2621         """ 
    2622         if ON_MAC: 
    2623             time.sleep(1) 
    26242601 
    26252602    def _find_polyfunc_selection(self, disp_func=None): 
  • src/sas/sasgui/perspectives/fitting/fitpage.py

    ra6fccd7 r1a8e13f0  
    18301830            self.onSmear(None) 
    18311831 
    1832     def _mac_sleep(self, sec=0.2): 
    1833         """ 
    1834         Give sleep to MAC 
    1835         """ 
    1836         if self.is_mac: 
    1837             time.sleep(sec) 
    1838  
    18391832    def get_view_mode(self): 
    18401833        """ 
     
    21962189        self.save_current_state() 
    21972190 
    2198         if not self.is_mac: 
    2199             self.Layout() 
    2200             self.Refresh() 
    2201         self._mac_sleep(0.1) 
    22022191        # plot model ( when drawing, do not update chisqr value again) 
    22032192        self._draw_model(update_chisqr=False, source='fit') 
  • src/sas/sasgui/perspectives/fitting/fitting.py

    r73cbeec r1a8e13f0  
    877877                qmin=qmin, qmax=qmax, weight=weight) 
    878878 
    879     def _mac_sleep(self, sec=0.2): 
    880         """ 
    881         Give sleep to MAC 
    882         """ 
    883         if ON_MAC: 
    884             time.sleep(sec) 
    885  
    886879    def draw_model(self, model, page_id, data=None, smearer=None, 
    887880                   enable1D=True, enable2D=False, 
     
    10311024                                manager=self, 
    10321025                                improvement_delta=0.1) 
    1033         self._mac_sleep(0.2) 
    10341026 
    10351027        # batch fit 
     
    12711263        :param elapsed: time spent at the fitting level 
    12721264        """ 
    1273         self._mac_sleep(0.2) 
    12741265        uid = page_id[0] 
    12751266        if uid in self.fit_thread_list.keys(): 
     
    15211512            page_id = [] 
    15221513        ## fit more than 1 model at the same time 
    1523         self._mac_sleep(0.2) 
    15241514        try: 
    15251515            index = 0 
Note: See TracChangeset for help on using the changeset viewer.