Changeset c82fd8f in sasview


Ignore:
Timestamp:
Oct 25, 2017 2:01:01 AM (7 years ago)
Author:
krzywon
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:
ced1bff
Parents:
83710be
Message:

Ensure the selected openCL selection retains its state when opening and closing the window.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Fitting/GPUOptions.py

    r83710be rc82fd8f  
    4545        i = 0 
    4646        self.sas_open_cl = os.environ.get("SAS_OPENCL", "") 
     47        self.setWindowFlags(self.windowFlags() | QtCore.Qt.CustomizeWindowHint) 
     48        self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowCloseButtonHint) 
    4749        for title, descr in cl_tuple: 
    4850            checkBox = QtGui.QCheckBox(self.openCLCheckBoxGroup) 
     
    111113        Close the window without modifying SAS_OPENCL 
    112114        """ 
    113         # FIXME: Reset option to original value 
    114         self.close() 
    115         self.open() 
     115        self.closeEvent(None) 
     116        self.parent.gpu_options_widget.open() 
    116117 
    117118    def accept(self): 
     
    131132 
    132133        reload(sasmodels.core) 
    133         super(GPUOptions, self).accept() 
     134        super(GPUOptions, self).reject() 
    134135 
    135136    def closeEvent(self, event): 
     
    137138        Overwrite QDialog close method to allow for custom widget close 
    138139        """ 
    139         self.parent.gpu_options_widget = reload(GPUOptions(self)) 
    140         self.reject() 
     140        self.close() 
     141        self.parent.gpu_options_widget = GPUOptions(self) 
    141142 
    142143 
Note: See TracChangeset for help on using the changeset viewer.