Ignore:
Timestamp:
Nov 9, 2017 6:43:56 AM (6 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 06:29:59)
git-committer:
Piotr Rozyczko <rozyczko@…> (11/09/17 06:43:56)
Message:

More Qt5 related fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/MainWindow/DataExplorer.py

    rfbfc488 rd6b8a1d  
    270270            'options'   : QtWidgets.QFileDialog.DontUseNativeDialog 
    271271        } 
    272         filename = str(QtWidgets.QFileDialog.getSaveFileName(**kwargs)) 
     272        name_tuple = QtWidgets.QFileDialog.getSaveFileName(**kwargs) 
     273        filename = name_tuple[0] 
    273274        if filename: 
     275            _, extension = os.path.splitext(filename) 
     276            if not extension: 
     277                filename = '.'.join((filename, 'json')) 
    274278            self.communicator.statusBarUpdateSignal.emit("Saving Project... %s\n" % os.path.basename(filename)) 
    275279            with open(filename, 'w') as outfile: 
     
    10841088        # TODO: fix this to resemble GuiUtils.updateModelItemWithPlot 
    10851089        # 
    1086         self.model.beginResetModel() 
    1087         current_tab_name = model_item.text()[:2] 
    1088         for current_index in range(self.theory_model.rowCount()): 
    1089             if current_tab_name in self.theory_model.item(current_index).text(): 
    1090                 self.theory_model.removeRow(current_index) 
    1091                 break 
    1092  
    1093         # Reset the view 
    1094         self.model.endResetModel() 
     1090        ##self.model.beginResetModel() 
     1091        ##current_tab_name = model_item.text()[:2] 
     1092        ##for current_index in range(self.theory_model.rowCount()): 
     1093            #if current_tab_name in self.theory_model.item(current_index).text(): 
     1094            #    return 
     1095        ##        self.theory_model.removeRow(current_index) 
     1096        ##        break 
     1097 
     1098        ### Reset the view 
     1099        ##self.model.endResetModel() 
    10951100 
    10961101        # Reset the view 
Note: See TracChangeset for help on using the changeset viewer.