elm_entry: If entry is empty, on selection cursor is hidden. Make a check whether... 79/119279/3
authorShilpa Singh <shilpa.singh@samsung.com>
Mon, 13 Mar 2017 14:49:49 +0000 (20:19 +0530)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Thu, 16 Mar 2017 08:30:57 +0000 (01:30 -0700)
Change-Id: If6769654056486dd12254fb3154551be316c80e9

src/lib/elm_entry.c

index 84ac4fc5383661ce61d89307b728f9c8e6c831d4..3775ff371e43f8dd4268862ec5735a14d48338b4 100644 (file)
@@ -6039,11 +6039,14 @@ _elm_entry_select_none(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd)
 }
 
 EOLIAN static void
-_elm_entry_select_all(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd)
+_elm_entry_select_all(Eo *obj, Elm_Entry_Data *sd)
 {
    //TIZEN_ONLY(20150806): Selection is enabled for password mode
    //if ((sd->password)) return;
    //
+   //TIZEN_ONLY(20170313) if entry is empty, no selection can happen
+   if (elm_entry_is_empty(obj)) return;
+   //
    if (sd->sel_mode)
      {
         sd->sel_mode = EINA_FALSE;
@@ -6056,11 +6059,14 @@ _elm_entry_select_all(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd)
 }
 
 EOLIAN static void
-_elm_entry_select_region_set(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd, int start, int end)
+_elm_entry_select_region_set(Eo *obj, Elm_Entry_Data *sd, int start, int end)
 {
    //TIZEN_ONLY(20150806): Selection is enabled for password mode
    //if ((sd->password)) return;
    //
+   //TIZEN_ONLY(20170313) if entry is empty, no selection can happen
+   if (elm_entry_is_empty(obj)) return;
+   //
    if (sd->sel_mode)
      {
         sd->sel_mode = EINA_FALSE;