Changeset cde0611 in sasview for src/sas/qtgui


Ignore:
Timestamp:
Aug 8, 2018 9:34:25 AM (6 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
b259485
Parents:
ebfe223 (diff), db05c44 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'ESS_GUI' of https://github.com/SasView/sasview into ESS_GUI

Location:
src/sas/qtgui
Files:
3 edited

Legend:

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

    raed0532 rdb05c44  
    3434    clicked = False 
    3535    sas_open_cl = None 
     36    cl_options = None 
    3637 
    3738    def __init__(self, parent=None): 
     
    4950        cl_tuple = _get_clinfo() 
    5051        self.sas_open_cl = os.environ.get("SAS_OPENCL", "") 
     52 
     53        # Keys are the names in the form "platform: device". Corresponding values are the combined indices, e.g. 
     54        # "0:1", for setting the SAS_OPENCL env. 
     55        self.cl_options = {} 
     56 
    5157        for title, descr in cl_tuple: 
    5258            # Create an item for each openCL option 
     
    5561            check_box.setText(_translate("GPUOptions", descr, None)) 
    5662            self.optionsLayout.addWidget(check_box) 
    57             if (descr == self.sas_open_cl) or ( 
     63            if (title == self.sas_open_cl) or ( 
    5864                            title == "None" and not self.clicked): 
    5965                check_box.click() 
    6066                self.clicked = True 
     67            self.cl_options[descr] = title 
    6168        self.openCLCheckBoxGroup.setMinimumWidth(self.optionsLayout.sizeHint().width()+10) 
    6269 
     
    7683        checked = None 
    7784        for box in self.openCLCheckBoxGroup.findChildren(QtWidgets.QCheckBox): 
    78             if box.isChecked() and (str(box.text()) == self.sas_open_cl or ( 
     85            if box.isChecked() and (self.cl_options[str(box.text())] == self.sas_open_cl or ( 
    7986                    str(box.text()) == "No OpenCL" and self.sas_open_cl == "")): 
    8087                box.setChecked(False) 
     
    8289                checked = box 
    8390        if hasattr(checked, "text"): 
    84             self.sas_open_cl = str(checked.text()) 
     91            self.sas_open_cl = self.cl_options[str(checked.text())] 
    8592        else: 
    8693            self.sas_open_cl = None 
     
    226233    for cl_platform in cl_platforms: 
    227234        d_index = 0 
    228         cl_platforms = cl_platform.get_devices() 
    229         for cl_platform in cl_platforms: 
    230             if len(cl_platforms) > 1 and len(cl_platforms) > 1: 
     235        cl_devices = cl_platform.get_devices() 
     236        for cl_device in cl_devices: 
     237            if len(cl_platforms) > 1 and len(cl_devices) > 1: 
    231238                combined_index = ":".join([str(p_index), str(d_index)]) 
    232239            elif len(cl_platforms) > 1: 
     
    234241            else: 
    235242                combined_index = str(d_index) 
    236             clinfo.append((combined_index, ":".join([cl_platform.name, 
    237                                                      cl_platform.name]))) 
     243            clinfo.append((combined_index, ": ".join([cl_platform.name, 
     244                                                     cl_device.name]))) 
    238245            d_index += 1 
    239246        p_index += 1 
  • src/sas/qtgui/MainWindow/DataExplorer.py

    rfce6c55 rebfe223  
    496496        # Now query the model item for available plots 
    497497        plots = GuiUtils.plotsFromFilename(filename, model) 
     498        ids = [list(self.active_plots.values())[id].data.id for id in range(len(self.active_plots))] 
    498499 
    499500        new_plots = [] 
    500501        for item, plot in plots.items(): 
    501502            plot_id = plot.id 
    502             if plot_id in list(self.active_plots.keys()): 
     503            if plot_id in ids: 
    503504                self.active_plots[plot_id].replacePlot(plot_id, plot) 
    504505            else: 
  • src/sas/qtgui/Perspectives/Fitting/FittingWidget.py

    r060413c rebfe223  
    135135        self.initializeCategoryCombo() 
    136136 
     137        # Initial control state 
     138        self.initializeControls() 
     139 
     140        QtWidgets.QApplication.processEvents() 
     141 
    137142        # Connect signals to controls 
    138143        self.initializeSignals() 
    139  
    140         # Initial control state 
    141         self.initializeControls() 
    142144 
    143145        if data is not None: 
     
    325327            QTreeView::item { 
    326328                border: 1px; 
    327                 padding: 2px 15px; 
     329                padding: 2px 1px; 
    328330            } 
    329331 
Note: See TracChangeset for help on using the changeset viewer.