spinner: Check the current text is special value or not. 78/91378/1
authorWoochan Lee <wc0917.lee@samsung.com>
Fri, 7 Oct 2016 07:43:36 +0000 (16:43 +0900)
committerWoochan Lee <wc0917.lee@samsung.com>
Fri, 7 Oct 2016 07:44:21 +0000 (16:44 +0900)
Change-Id: I2059efe145501ae8f87ad2880927cb5abb25dc7b

src/lib/elm_spinner.c

index cc68f4b9402ed6ccd6e477ec4ecb1ddc801d7f7b..366f32575cce05e5dfa04a0c89587b3adaca1d67 100644 (file)
@@ -427,6 +427,12 @@ _entry_value_apply(Evas_Object *obj)
    str = elm_object_text_get(sd->ent);
    if (!str) return;
 
+   //TIZEN_ONLY(20161007): If user set special value as number. spinner value
+   //                      should not set as special value.
+   char *special_value = elm_spinner_special_value_get(obj, sd->val);
+   if (special_value && !strcmp(special_value, str)) return;
+   //
+
    val = strtod(str, &end);
    if (((*end != '\0') && (!isspace(*end))) || (fabs(val - sd->val) < DBL_EPSILON)) return;
    elm_spinner_value_set(obj, val);