TOOLS: Fixed that the text box does not display command when click on 25/16425/2
authorhyocheol.ahn <hyocheol.ahn@samsung.com>
Mon, 17 Feb 2014 08:54:57 +0000 (17:54 +0900)
committerhyocheol.ahn <hyocheol.ahn@samsung.com>
Tue, 18 Feb 2014 09:43:53 +0000 (18:43 +0900)
the second column on command bar help in Windows.

Change-Id: Ia0b2d04d74699e9edc13772551c34a9bdf880cf2
Signed-off-by: hyocheol.ahn <hyocheol.ahn@samsung.com>
org.tizen.common.ui/src/org/tizen/common/ui/commandbar/textAssist/TextAssist.java

index bf8e65c..91acd26 100644 (file)
@@ -303,7 +303,12 @@ public class TextAssist extends Composite {
         return new Listener() {
             @Override
             public void handleEvent(final Event event) {
-                String text = TextAssist.this.table.getSelection()[0].getText();
+                //String text = TextAssist.this.table.getSelection()[0].getText();
+                TableItem item = TextAssist.this.table.getItem( new Point(0, event.y));
+               if(item == null){
+                       return;
+               }
+               String text = item.getText();
                 TextAssist.this.text.setForeground(SWTUtil.getDisplay().getSystemColor(SWT.COLOR_BLACK));
                 TextAssist.this.text.setText(text);
                 TextAssist.this.popup.setVisible(false);