Ignore:
Timestamp:
Dec 20, 2016 7:59:08 AM (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.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:
b61bd57
Parents:
d3911e3 (diff), 06a4306 (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-811

File:
1 edited

Legend:

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

    rd3911e3 r505706a  
    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 
     
    14351434                    self.qmax_x = tempmax 
    14361435                    is_modified = True 
    1437  
    14381436                if is_2Ddata: 
    1439                     # set mask 
    14401437                    is_modified = self._validate_Npts() 
    1441  
     1438                else: 
     1439                    is_modified = self._validate_Npts_1D() 
    14421440            else: 
    14431441                self.fitrange = False 
     
    14541452                # Theory case: need to get npts value to draw 
    14551453                self.npts_x = float(self.Npts_total.GetValue()) 
     1454                self.Npts_fit.SetValue(str(self.Npts_total.GetValue())) 
     1455                self._save_plotting_range() 
    14561456                self.create_default_data() 
    14571457                self.state_change = True 
    14581458                self._draw_model() 
     1459                # Time delay has been introduced to prevent _handle error 
     1460                # on Windows 
     1461                # This part of code is executed when model is selected and 
     1462                # it's parameters are changed (with respect to previously 
     1463                # selected model). There are two Iq evaluations occuring one 
     1464                # after another and therefore there may be compilation error 
     1465                # if model is calculated for the first time. 
     1466                # This seems to be Windows only issue - haven't tested on Linux 
     1467                # though.The proper solution (other than time delay) requires 
     1468                # more fundemental code refatoring 
     1469                # Wojtek P. Nov 7, 2016 
     1470                if not ON_MAC: 
     1471                    time.sleep(0.1) 
    14591472                self.Refresh() 
    14601473 
     
    21672180                flag = False 
    21682181            else: 
    2169                 self.Npts_fit.SetValue(str(len(index_data[index_data is True]))) 
     2182                self.Npts_fit.SetValue(str(len(index_data[index_data]))) 
    21702183                self.fitrange = True 
    21712184 
     
    23912404 
    23922405        # Redraw the model 
    2393         self._draw_model() 
     2406        #  Wojtek P. Nov 7, 2016: Redrawing seems to be unnecessary here 
     2407        # self._draw_model() 
    23942408        # self._undo.Enable(True) 
    23952409        event = PageInfoEvent(page=self) 
     
    26102624            Layout after self._draw_model 
    26112625        """ 
    2612         if ON_MAC is True: 
     2626        if ON_MAC: 
    26132627            time.sleep(1) 
    26142628 
Note: See TracChangeset for help on using the changeset viewer.