Skip to content

Commit

Permalink
Merge pull request #2848 from SasView/2841-no-opengl-radiobutton-rele…
Browse files Browse the repository at this point in the history
…ase_6.0.0

Add a button group to allow for proper logic of radio buttons
  • Loading branch information
rozyczko authored Apr 16, 2024
2 parents d700cb6 + 28f65fb commit f5f6182
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/sas/qtgui/Perspectives/Fitting/GPUOptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ def __init__(self):
self.setupUi(self)

self.radio_buttons = []

self.add_options()
self.progressBar.setVisible(False)
self.progressBar.setFormat(" Test %v / %m")
Expand Down Expand Up @@ -88,14 +87,18 @@ def add_options(self):

self.cl_options = {}

# Create a button group for the radio buttons
self.radio_group = QtWidgets.QButtonGroup()

# Create a radio button for each openCL option and add to layout
for title, descr in cl_tuple:

# Create an item for each openCL option
radio_button = QtWidgets.QRadioButton()
radio_button.setObjectName(_fromUtf8(descr))
radio_button.setText(_translate("GPUOptions", descr, None))
self.optionsLayout.addWidget(radio_button)

self.radio_group.addButton(radio_button)
if title.lower() == config.SAS_OPENCL.lower():
radio_button.setChecked(True)

Expand Down

0 comments on commit f5f6182

Please sign in to comment.