Changeset 27ba79c in sasview for src


Ignore:
Timestamp:
Feb 28, 2017 11:33:01 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:
c1c9929
Parents:
be36447
Message:

Simplify and fix _on_select_data method.

File:
1 edited

Legend:

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

    rbe36447 r27ba79c  
    164164        On_select_data 
    165165        """ 
    166         pos = 0 
    167         if event is not None: 
    168             pos = self.dataSource.GetSelection() 
    169         elif self.dataSource.GetCount() > 0: 
     166        if self.dataSource.GetCount() > 0: 
     167            pos = self.dataSource.GetSelection() if event is not None else 0 
    170168            data = self.dataSource.GetClientData(pos) 
    171169            self.set_data(data) 
Note: See TracChangeset for help on using the changeset viewer.