[Title] DACombo bug fix
authorjy.exe.lee <jy.exe.lee@samsung.com>
Tue, 26 Jun 2012 07:54:05 +0000 (16:54 +0900)
committerjy.exe.lee <jy.exe.lee@samsung.com>
Tue, 26 Jun 2012 07:54:05 +0000 (16:54 +0900)
[Type] bug fix
[Module] DynamicAnalyzer
[Priority] major
[CQ#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/combo/DACombo.java

index e000c28..991c067 100644 (file)
@@ -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;
        }