aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Keller2011-09-01 10:27:43 (EDT)
committerFelipe Heidrich2011-09-01 10:27:43 (EDT)
commitd0c62e62cda660d486eaa02838d173e7b979b0e2 (patch)
tree0d509294fa2f5ab36945f77675d425df49c46f81
parent05761af3e7422a7a4383e0bdfd28d8b130c84c37 (diff)
downloadeclipse.platform.swt-d0c62e62cda660d486eaa02838d173e7b979b0e2.zip
eclipse.platform.swt-d0c62e62cda660d486eaa02838d173e7b979b0e2.tar.gz
eclipse.platform.swt-d0c62e62cda660d486eaa02838d173e7b979b0e2.tar.bz2
Bug 356476 - ControlExample: Can't enter multi-digit values in ProgressBar's spinners
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ProgressBarTab.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ProgressBarTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ProgressBarTab.java
index 8d91ff3..e076451 100755
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ProgressBarTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ProgressBarTab.java
@@ -171,8 +171,12 @@ class ProgressBarTab extends RangeTab {
* on the "Example" widget.
*/
void updateSpinners () {
- minimumSpinner.setSelection (progressBar1.getMinimum ());
- selectionSpinner.setSelection (progressBar1.getSelection ());
- maximumSpinner.setSelection (progressBar1.getMaximum ());
+ updateSpinner (minimumSpinner, progressBar1.getMinimum ());
+ updateSpinner (selectionSpinner, progressBar1.getSelection ());
+ updateSpinner (maximumSpinner, progressBar1.getMaximum ());
+ }
+
+ void updateSpinner(Spinner spinner, int selection) {
+ if (spinner.getSelection() != selection) spinner.setSelection (selection);
}
}