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:
parent
4d1f5c0b4d
commit
a138124097
1 changed files with 5 additions and 3 deletions
|
@ -8,6 +8,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* IBM Corporation - initial API and implementation
|
* IBM Corporation - initial API and implementation
|
||||||
* QNX Software System
|
* QNX Software System
|
||||||
|
* James Blackburn (Broadcom Corp.)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.utils.ui.controls;
|
package org.eclipse.cdt.utils.ui.controls;
|
||||||
|
|
||||||
|
@ -172,7 +173,7 @@ public class RadioButtonsArea extends Composite {
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
for (Button radio : radioButtons) {
|
for (Button radio : radioButtons) {
|
||||||
boolean selection = false;
|
boolean selection = false;
|
||||||
if (((String) radio.getData()).equals(this.value)) {
|
if (radio.getData().equals(this.value)) {
|
||||||
selection = true;
|
selection = true;
|
||||||
found = true;
|
found = true;
|
||||||
}
|
}
|
||||||
|
@ -208,8 +209,9 @@ public class RadioButtonsArea extends Composite {
|
||||||
b.setSelection(false);
|
b.setSelection(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
b = radioButtons[index];
|
b = radioButtons[index];
|
||||||
|
this.value = (String)b.getData();
|
||||||
b.setSelection(true);
|
b.setSelection(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,7 +225,7 @@ public class RadioButtonsArea extends Composite {
|
||||||
|
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
for (int i = 0; i < radioButtons.length; i++) {
|
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;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue