From 5eda60295283668d91fd62814d9341d40fc4277e Mon Sep 17 00:00:00 2001 From: Laurent Clouet Date: Thu, 29 Jan 2015 14:30:53 +0000 Subject: [PATCH] Bugfix: set to selected the right gpu (not all of them) --- .../sheepit/client/standalone/swing/activity/Settings.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/com/sheepit/client/standalone/swing/activity/Settings.java b/src/com/sheepit/client/standalone/swing/activity/Settings.java index 4678e44..92c5f47 100644 --- a/src/com/sheepit/client/standalone/swing/activity/Settings.java +++ b/src/com/sheepit/client/standalone/swing/activity/Settings.java @@ -137,7 +137,12 @@ public class Settings implements Activity { n += 20; JCheckBoxGPU gpuCheckBox = new JCheckBoxGPU(gpu); gpuCheckBox.setToolTipText(gpu.getCudaName()); - gpuCheckBox.setSelected(gpuChecked); + if (gpuChecked) { + GPUDevice config_gpu = config.getGPUDevice(); + if (config_gpu != null && config_gpu.getCudaName().equals(gpu.getCudaName())) { + gpuCheckBox.setSelected(gpuChecked); + } + } gpuCheckBox.setBounds(start_label_right, n, 200, size_height_label); gpuCheckBox.addActionListener(new GpuChangeAction()); parent.getContentPane().add(gpuCheckBox);