Ignore:
Timestamp:
Nov 9, 2017 8:43:56 AM (7 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
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
Children:
53c771e
Parents:
fbfc488
git-author:
Piotr Rozyczko <rozyczko@…> (11/07/17 08:29:59)
git-committer:
Piotr Rozyczko <rozyczko@…> (11/09/17 08:43:56)
Message:

More Qt5 related fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Calculators/GenericScatteringCalculator.py

    rfbfc488 rd6b8a1d  
    611611            'options': QtWidgets.QFileDialog.DontUseNativeDialog} 
    612612        # Query user for filename. 
    613         filename = str(QtWidgets.QFileDialog.getSaveFileName(**kwargs)) 
     613        filename_tuple = QtWidgets.QFileDialog.getSaveFileName(**kwargs) 
     614        filename = name_tuple[0] 
    614615        if filename: 
    615616            try: 
    616                 if os.path.splitext(filename)[1].lower() == '.sld': 
    617                     sas_gen.SLDReader().write(filename, self.sld_data) 
    618                 else: 
    619                     sas_gen.SLDReader().write('.'.join((filename, 'sld')), 
    620                                               self.sld_data) 
     617                _, extension = os.path.splitext(filename) 
     618                if not extension: 
     619                    filename = '.'.join((filename, 'sld')) 
     620                sas_gen.SLDReader().write(filename, self.sld_data) 
    621621            except: 
    622622                raise 
Note: See TracChangeset for help on using the changeset viewer.