From 9f6fae5c4763724783c12ff7228b0d08214bc9cd Mon Sep 17 00:00:00 2001 From: "jy.exe.lee" Date: Tue, 26 Jun 2012 16:54:05 +0900 Subject: [PATCH] [Title] DACombo bug fix [Type] bug fix [Module] DynamicAnalyzer [Priority] major [CQ#] [Redmine#] [Problem] [Cause] [Solution] [TestCase] --- .../org/tizen/dynamicanalyzer/ui/widgets/combo/DACombo.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/combo/DACombo.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/combo/DACombo.java index e000c28..991c067 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/combo/DACombo.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/combo/DACombo.java @@ -344,10 +344,10 @@ public class DACombo extends Composite { }; public void setText(String text) { - // if (!setSelect(text)) { - this.text = text; - combo.redraw(); - // } + if (!setSelect(text)) { + this.text = text; + combo.redraw(); + } } private boolean setSelect(String text) { @@ -360,11 +360,14 @@ public class DACombo extends Composite { return false; } int size = items.size(); - if (index + MAX_SIZE > size) { + if (index + MAX_SIZE >= size) { int lower = size - index; selection = MAX_SIZE - lower; itemIndex = size - MAX_SIZE; select(selection); + } else { + selection = index - itemIndex; + select(selection); } return true; } -- 2.7.4