Ignore:
Timestamp:
Dec 21, 2016 10:48:31 AM (8 years ago)
Author:
krzywon
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:
fa487d93
Parents:
9e0aa69a (diff), bb3eb744 (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.
Message:

Merge branch 'master' into ticket-795

File:
1 edited

Legend:

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

    r9e0aa69a ra6fccd7  
    5252    FONT_VARIANT = 1 
    5353    ON_MAC = True 
    54  
    5554 
    5655class BasicPage(ScrolledPanel, PanelBase): 
     
    10421041                        disp_model = POLYDISPERSITY_MODELS['array']() 
    10431042                        if hasattr(state, "values") and \ 
    1044                                  self.disp_cb_dict[item].GetValue() is True: 
     1043                                 self.disp_cb_dict[item].GetValue(): 
    10451044                            if len(state.values) > 0: 
    10461045                                self.values = state.values 
     
    14511450                self.state_change = True 
    14521451                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) 
    14531465                self.Refresh() 
    14541466 
     
    21292141                flag = False 
    21302142            else: 
    2131                 self.Npts_fit.SetValue(str(len(index_data[index_data is True]))) 
     2143                self.Npts_fit.SetValue(str(len(index_data[index_data]))) 
    21322144                self.fitrange = True 
    21332145 
     
    21642176                flag = False 
    21652177            else: 
    2166                 val = index_data[index_data is True] 
    2167                 val = len(val) if isinstance(val, list) else 1 
    2168                 self.Npts_fit.SetValue(str(val)) 
     2178                self.Npts_fit.SetValue(str(len(index_data[index_data]))) 
    21692179                self.fitrange = True 
    21702180 
     
    23902400 
    23912401        # Redraw the model 
    2392         self._draw_model() 
     2402        #  Wojtek P. Nov 7, 2016: Redrawing seems to be unnecessary here 
     2403        # self._draw_model() 
    23932404        # self._undo.Enable(True) 
    23942405        event = PageInfoEvent(page=self) 
     
    26092620            Layout after self._draw_model 
    26102621        """ 
    2611         if ON_MAC is True: 
     2622        if ON_MAC: 
    26122623            time.sleep(1) 
    26132624 
Note: See TracChangeset for help on using the changeset viewer.