Ignore:
Timestamp:
May 6, 2010 1:44:57 PM (14 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:
e6093db
Parents:
85e665e
Message:

working on data editor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • calculatorview/perspectives/calculator/collimation_editor.py

    r85e665e rc5dca87  
    6969        collimation_name_txt.SetToolTipString(hint_collimation_txt)  
    7070        self.collimation_cbox = wx.ComboBox(self, -1, style=wx.CB_READONLY) 
     71        wx.EVT_COMBOBOX(self.collimation_cbox, -1, self.on_select_collimation)  
    7172        hint_collimation_name_txt = 'Name of collimations.' 
    7273        self.collimation_cbox.SetToolTipString(hint_collimation_name_txt)  
     
    229230        self.enable_collimation()  
    230231        self.bt_add_aperture.Enable() 
     232        self.fill_aperture_combox() 
     233        self.enable_aperture() 
    231234        self.set_values() 
    232235         
     
    258261        self.enable_aperture() 
    259262         
     263    def on_select_collimation(self, event): 
     264        """ 
     265           fill the control on the panel according to the current  selected collimation  
     266        """ 
     267        self.set_values() 
     268        self.fill_aperture_combox() 
     269        self.enable_aperture() 
     270     
    260271    def enable_collimation(self): 
    261272        """ 
     
    366377            n_aperture = self.aperture_cbox.GetCount() 
    367378            aperture_hint_txt = 'apertures available: %s '%str(n_aperture) 
    368             if len(collimation.aperture) > 1: 
     379            if len(collimation.aperture) > 0: 
    369380                self.bt_remove_aperture.Enable() 
    370381            else: 
     
    393404            fill the current combobox with the available aperture 
    394405        """ 
     406        self.aperture_cbox.Clear() 
    395407        collimation, _, _ = self.get_current_collimation() 
    396408        if collimation is None or not collimation.aperture: 
    397409            return 
    398          
    399410        for aperture in collimation.aperture: 
    400411            pos = self.aperture_cbox.Append(str(aperture.name)) 
Note: See TracChangeset for help on using the changeset viewer.