1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 294316 RadioButtonsArea should update cache'd value when #setSelectedButton(int) is called

This commit is contained in:
James Blackburn 2009-11-05 13:19:50 +00:00
parent 4d1f5c0b4d
commit a138124097

View file

@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* QNX Software System
* James Blackburn (Broadcom Corp.)
*******************************************************************************/
package org.eclipse.cdt.utils.ui.controls;
@ -172,7 +173,7 @@ public class RadioButtonsArea extends Composite {
boolean found = false;
for (Button radio : radioButtons) {
boolean selection = false;
if (((String) radio.getData()).equals(this.value)) {
if (radio.getData().equals(this.value)) {
selection = true;
found = true;
}
@ -208,8 +209,9 @@ public class RadioButtonsArea extends Composite {
b.setSelection(false);
}
}
b = radioButtons[index];
this.value = (String)b.getData();
b.setSelection(true);
}
@ -223,7 +225,7 @@ public class RadioButtonsArea extends Composite {
if (value != null) {
for (int i = 0; i < radioButtons.length; i++) {
if (((String) radioButtons[i].getData()).equals(this.value))
if (radioButtons[i].getData().equals(this.value))
return i;
}
}