Ignore:
Timestamp:
Aug 8, 2016 11:14:11 AM (8 years ago)
Author:
lewis
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:
ba65aff
Parents:
0fff02fb
Message:

Disable inputs that aren't used when BSL format selected

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/file_converter/converter_panel.py

    r489bb46 rd6bf064  
    5959        self.iq_input = None 
    6060        self.output = None 
     61        self.radiation_input = None 
     62        self.metadata_section = None 
    6163        self.data_type = "ascii" 
    6264 
     
    357359            self.q_input.SetPath("") 
    358360            self.q_input.Disable() 
     361            self.radiation_input.Disable() 
     362            self.metadata_section.Collapse() 
     363            self.on_collapsible_pane(None) 
     364            self.metadata_section.Disable() 
    359365        else: 
    360366            self.q_input.Enable() 
     367            self.radiation_input.Enable() 
     368            self.metadata_section.Enable() 
    361369 
    362370    def radiationtype_changed(self, event): 
     
    434442        radiation_label = wx.StaticText(self, -1, "Radiation Type: ") 
    435443        input_grid.Add(radiation_label, (y,0), (1,1), wx.ALIGN_CENTER_VERTICAL, 5) 
    436         radiation_input = wx.ComboBox(self, -1, 
     444        self.radiation_input = wx.ComboBox(self, -1, 
    437445            choices=["Neutron", "X-Ray", "Muon", "Electron"], 
    438446            name="radiation", style=wx.CB_READONLY, value="Neutron") 
    439         radiation_input.Bind(wx.EVT_COMBOBOX, self.radiationtype_changed) 
    440         input_grid.Add(radiation_input, (y,1), (1,1), wx.ALL, 5) 
     447        self.radiation_input.Bind(wx.EVT_COMBOBOX, self.radiationtype_changed) 
     448        input_grid.Add(self.radiation_input, (y,1), (1,1), wx.ALL, 5) 
    441449        y += 1 
    442450 
     
    464472        vbox.Add(section_sizer, flag=wx.ALL, border=5) 
    465473 
    466         metadata_section = wx.CollapsiblePane(self, -1, "Metadata", 
     474        self.metadata_section = wx.CollapsiblePane(self, -1, "Metadata", 
    467475            size=(_STATICBOX_WIDTH+40, -1), style=wx.WS_EX_VALIDATE_RECURSIVELY) 
    468         metadata_pane = metadata_section.GetPane() 
     476        metadata_pane = self.metadata_section.GetPane() 
    469477        metadata_grid = wx.GridBagSizer(5, 5) 
    470478 
    471         metadata_section.Bind(wx.EVT_COLLAPSIBLEPANE_CHANGED, 
     479        self.metadata_section.Bind(wx.EVT_COLLAPSIBLEPANE_CHANGED, 
    472480            self.on_collapsible_pane) 
    473481 
     
    513521        metadata_pane.SetSizer(metadata_grid) 
    514522 
    515         vbox.Add(metadata_section, proportion=0, flag=wx.ALL, border=5) 
     523        vbox.Add(self.metadata_section, proportion=0, flag=wx.ALL, border=5) 
    516524 
    517525        vbox.Fit(self) 
Note: See TracChangeset for help on using the changeset viewer.