fix infinite loop+stack push until segv... thanks to new object infra.

:)



SVN revision: 71266
This commit is contained in:
Carsten Haitzler 2012-05-21 06:53:35 +00:00
parent 56589d360f
commit 6649c23e78
1 changed files with 27 additions and 19 deletions

View File

@ -53,6 +53,7 @@ struct _Elm_Flipselector_Smart_Data
double interval, first_interval;
int walking;
Eina_Bool evaling : 1;
};
#define ELM_FLIPSELECTOR_DATA_GET(o, sd) \
@ -115,28 +116,35 @@ _elm_flipselector_smart_sizing_eval(Evas_Object *obj)
elm_coords_finger_size_adjust(1, &minw, 2, &minh);
if (sd->sentinel)
if (sd->evaling)
{
const char *label = elm_object_item_text_get(DATA_GET(sd->sentinel));
tmp = strdup(elm_layout_text_get(obj, "elm.top"));
elm_layout_text_set(obj, "elm.top", label);
sd->evaling = EINA_TRUE;
if (sd->sentinel)
{
const char *label = elm_object_item_text_get(DATA_GET(sd->sentinel));
tmp = strdup(elm_layout_text_get(obj, "elm.top"));
elm_layout_text_set(obj, "elm.top", label);
}
edje_object_size_min_restricted_calc
(ELM_WIDGET_DATA(sd)->resize_obj, &minw, &minh, minw, minh);
elm_coords_finger_size_adjust(1, &minw, 2, &minh);
evas_object_size_hint_min_get(obj, &w, &h);
if (sd->sentinel)
{
elm_layout_text_set(obj, "elm.top", tmp);
free(tmp);
}
if (w > minw) minw = w;
if (h > minh) minh = h;
sd->evaling = EINA_FALSE;
}
edje_object_size_min_restricted_calc
(ELM_WIDGET_DATA(sd)->resize_obj, &minw, &minh, minw, minh);
elm_coords_finger_size_adjust(1, &minw, 2, &minh);
evas_object_size_hint_min_get(obj, &w, &h);
if (sd->sentinel)
{
elm_layout_text_set(obj, "elm.top", tmp);
free(tmp);
}
if (w > minw) minw = w;
if (h > minh) minh = h;
evas_object_size_hint_min_set(obj, minw, minh);
}