TSAM-9117 Delete key working not correct 62/93262/1
authorEugene Kurzberg <i.kurtsberg@samsung.com>
Fri, 21 Oct 2016 10:11:23 +0000 (13:11 +0300)
committerEugene Kurzberg <i.kurtsberg@samsung.com>
Fri, 21 Oct 2016 10:11:38 +0000 (13:11 +0300)
TSAM-9121 The cursor display wrong position when select all

Change-Id: Ie06c4b128ef6de42e9bdb1254c6d54536ff2333f
Signed-off-by: Eugene Kurzberg <i.kurtsberg@samsung.com>
lib-phone/src/Phone/Dialer/KeypadEntry.cpp

index 8fa96ba..63a53a3 100644 (file)
@@ -48,11 +48,13 @@ void KeypadEntry::insert(char c)
 
 void KeypadEntry::popBack()
 {
-       int pos = elm_entry_cursor_pos_get(getEvasObject());
-       if (pos > 0) {
-               elm_entry_select_region_set(getEvasObject(), pos - 1, pos);
-               elm_entry_entry_insert(getEvasObject(), "");
+       if (!elm_entry_selection_get(getEvasObject())) {
+               int pos = elm_entry_cursor_pos_get(getEvasObject());
+               if (pos > 0) {
+                       elm_entry_select_region_set(getEvasObject(), pos - 1, pos);
+               }
        }
+       elm_entry_entry_insert(getEvasObject(), "");
 }
 
 void KeypadEntry::clear()