Ignore:
Timestamp:
Aug 9, 2016 7:23:01 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:
94667e27
Parents:
dc8a553
Message:

Show correct filetypes when chosing output file

File:
1 edited

Legend:

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

    r9c500ab r0e11ec7  
    1010from sas.sasgui.guiframe.panel_base import PanelBase 
    1111from sas.sasgui.perspectives.calculator import calculator_widgets as widget 
    12 from sas.sasgui.perspectives.file_converter.converter_widgets import VectorInput 
     12from sas.sasgui.perspectives.file_converter.converter_widgets import FileInput 
    1313from sas.sasgui.perspectives.file_converter.meta_panels import MetadataWindow 
    1414from sas.sasgui.perspectives.file_converter.meta_panels import DetectorPanel 
     
    486486            self.on_collapsible_pane(None) 
    487487            self.metadata_section.Disable() 
     488            self.output.SetWildcard("Red2D (*.dat)|*.dat") 
    488489        else: 
    489490            self.q_input.Enable() 
    490491            self.radiation_input.Enable() 
    491492            self.metadata_section.Enable() 
     493            self.output.SetWildcard("CanSAS 1D (*.xml)|*.xml") 
    492494 
    493495    def radiationtype_changed(self, event): 
     
    575577        input_grid.Add(output_label, (y,0), (1,1), wx.ALIGN_CENTER_VERTICAL, 5) 
    576578 
    577         self.output = wx.FilePickerCtrl(self, -1, 
    578             size=(_STATICBOX_WIDTH-80, -1), 
    579             message="Chose where to save the output file.", 
    580             style=wx.FLP_SAVE | wx.FLP_OVERWRITE_PROMPT | wx.FLP_USE_TEXTCTRL, 
    581             wildcard="CanSAS 1D (*.xml)|*.xml|Red2D (*.dat)|*.dat") 
    582         input_grid.Add(self.output, (y,1), (1,1), wx.ALL, 5) 
     579        self.output = FileInput(self, 
     580            wildcard="CanSAS 1D (*.xml)|*.xml") 
     581        input_grid.Add(self.output.GetCtrl(), (y,1), (1,1), wx.EXPAND | wx.ALL, 5) 
    583582        y += 1 
    584583 
Note: See TracChangeset for help on using the changeset viewer.