popup: add a allow eval flag not to call another sizing eval during sizing eval 37/76437/2
authorJinyong Park <j4939.park@samsung.com>
Fri, 24 Jun 2016 02:43:51 +0000 (11:43 +0900)
committerJinyong Park <j4939.park@samsung.com>
Fri, 24 Jun 2016 05:05:40 +0000 (14:05 +0900)
Change-Id: Ib82e7b2a01c9549e5eb8d8fa7a8eb6494b2d0f52
Signed-off-by: Jinyong Park <j4939.park@samsung.com>
src/lib/elc_popup.c
src/lib/elm_widget_popup.h

index 196e97d..c00e59d 100644 (file)
@@ -562,6 +562,12 @@ _elm_popup_elm_layout_sizing_eval(Eo *obj, Elm_Popup_Data *sd)
    Evas_Coord h_box = 0, minh_box = 0;
    Evas_Coord minw = -1, minh = -1;
 
+   //TIZEN_ONLY(20160624): add a allow eval flag not to call another sizing eval during sizing eval
+   if (!sd->allow_eval) return;
+
+   sd->allow_eval = EINA_FALSE;
+   //
+
    if (sd->items)
      {
         EINA_LIST_FOREACH(sd->items, elist, it)
@@ -625,13 +631,21 @@ _elm_popup_elm_layout_sizing_eval(Eo *obj, Elm_Popup_Data *sd)
         else
           evas_object_size_hint_min_set(sd->spacer, minw, minh);
 
-       return;
+        //TIZEN_ONLY(20160624): add a allow eval flag not to call another sizing eval during sizing eval
+        sd->allow_eval = EINA_TRUE;
+        //
+
+        return;
      }
 
    edje_object_size_min_calc(elm_layout_edje_get(sd->main_layout), &minw, &minh);
 
    evas_object_size_hint_min_set(obj, minw, minh);
    evas_object_size_hint_max_set(obj, -1, -1);
+
+   //TIZEN_ONLY(20160624): add a allow eval flag not to call another sizing eval during sizing eval
+   sd->allow_eval = EINA_TRUE;
+   //
 }
 
 EOLIAN static void
@@ -1731,6 +1745,10 @@ _elm_popup_evas_object_smart_add(Eo *obj, Elm_Popup_Data *priv)
    eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
    elm_widget_sub_object_parent_add(obj);
 
+   //TIZEN_ONLY(20160624): add a allow eval flag not to call another sizing eval during sizing eval
+   priv->allow_eval = EINA_TRUE;
+   //
+
    snprintf(style, sizeof(style), "popup/%s", elm_widget_style_get(obj));
 
    priv->notify = elm_notify_add(obj);
index 7dd0f2b..76920de 100644 (file)
@@ -59,6 +59,10 @@ struct _Elm_Popup_Data
    Eina_Bool             scr_size_recalc : 1;
    Eina_Bool             scroll : 1;
    Eina_Bool             theme_scroll : 1;
+
+   //TIZEN_ONLY(20160624): add a allow eval flag not to call another sizing eval during sizing eval
+   Eina_Bool             allow_eval : 1;
+   //
 };
 
 typedef struct _Elm_Popup_Item_Data Elm_Popup_Item_Data;