Changeset 5531a46 in sasview


Ignore:
Timestamp:
Oct 21, 2011 3:18:29 PM (13 years ago)
Author:
Gervaise Alina <gervyh@…>
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, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
43ede45
Parents:
657490af
Message:

make sure the grid is not editable when there is no data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansguiframe/src/sans/guiframe/data_processor.py

    r6dad639 r5531a46  
    129129        self.list_plot_panels = {} 
    130130        self.default_col_width = 75 
     131        self.EnableEditing(False) 
    131132        if self.GetNumberCols() > 0: 
    132133            self.default_col_width =  self.GetColSize(0) 
     
    263264        """ 
    264265        """ 
     266        if self.data is None: 
     267            return 
    265268        id = wx.NewId() 
    266269        title = "Empty" 
     
    282285        """ 
    283286        """ 
     287        if self.data is None: 
     288            return 
    284289        id = wx.NewId() 
    285290        title = "Empty" 
     
    403408        for item in (self.data_outputs, self.data_inputs): 
    404409            self.data.update(item) 
     410             
     411        if len(self.data) + len(self.data_inputs) +len(self.data_outputs) == 0: 
     412            self.EnableEditing(False) 
     413        else: 
     414            self.EnableEditing(True) 
    405415        if  len(self.data_outputs) > 0: 
    406416            self._cols = self.GetNumberCols() 
Note: See TracChangeset for help on using the changeset viewer.