[elm] Init code fix - thumb.
authorGustavo Lima Chaves <glima@profusion.mobi>
Tue, 17 Jul 2012 18:43:53 +0000 (18:43 +0000)
committerGustavo Lima Chaves <glima@profusion.mobi>
Tue, 17 Jul 2012 18:43:53 +0000 (18:43 +0000)
SVN revision: 74005

src/lib/elm_thumb.c

index 250ac06..ee50ada 100644 (file)
@@ -591,6 +591,12 @@ _elm_thumb_smart_add(Evas_Object *obj)
 
    ELM_WIDGET_CLASS(_elm_thumb_parent_sc)->base.add(obj);
 
+   elm_widget_resize_object_set(obj, elm_layout_add(obj));
+
+   elm_layout_theme_set
+     (ELM_WIDGET_DATA(priv)->resize_obj, "thumb", "base",
+     elm_widget_style_get(obj));
+
    priv->view = NULL;
    priv->file = NULL;
    priv->key = NULL;
@@ -667,14 +673,6 @@ elm_thumb_add(Evas_Object *parent)
    if (!elm_widget_sub_object_add(parent, obj))
      ERR("could not add %p as sub object of %p", obj, parent);
 
-   ELM_THUMB_DATA_GET(obj, sd);
-
-   elm_widget_resize_object_set(obj, elm_layout_add(obj));
-
-   elm_layout_theme_set
-     (ELM_WIDGET_DATA(sd)->resize_obj, "thumb", "base",
-     elm_widget_style_get(obj));
-
    return obj;
 }