elm widget.c: Code refactorying. Check sobj first. We do not need to check sobj twice.

SVN revision: 64182
This commit is contained in:
Daniel Juyung Seo 2011-10-19 17:07:15 +00:00
parent b416b6e686
commit 72e463d9b0
1 changed files with 39 additions and 41 deletions

View File

@ -1010,9 +1010,10 @@ elm_widget_resize_object_set(Evas_Object *obj,
if (elm_widget_focus_get(sd->resize_obj)) _unfocus_parents(obj);
}
}
if (!sobj) return;
// orphan new resize obj
if (sobj)
{
evas_object_data_del(sobj, "elm-parent");
if (_elm_widget_is(sobj))
{
@ -1030,11 +1031,9 @@ elm_widget_resize_object_set(Evas_Object *obj,
{
if (elm_widget_focus_get(sobj)) _unfocus_parents(obj);
}
}
// set the resize obj up
sd->resize_obj = sobj;
if (sd->resize_obj)
{
if (_elm_widget_is(sd->resize_obj))
{
Smart_Data *sd2 = evas_object_smart_data_get(sd->resize_obj);
@ -1060,7 +1059,6 @@ elm_widget_resize_object_set(Evas_Object *obj,
if (elm_widget_focus_get(sobj)) _focus_parents(obj);
}
}
}
EAPI void
elm_widget_hover_object_set(Evas_Object *obj,