report global scale if none is set.

If there is no parent or no scale set we should report the global
value, not try to get from the existent parent that would fail the
API_ENTRY and thus return 1.0.



SVN revision: 41022
This commit is contained in:
Gustavo Sverzut Barbieri 2009-06-12 22:55:06 +00:00
parent 714f1624f6
commit 324514d258
1 changed files with 7 additions and 1 deletions

View File

@ -765,7 +765,13 @@ EAPI double
elm_widget_scale_get(const Evas_Object *obj)
{
API_ENTRY return 1.0;
if (sd->scale == 0.0) return elm_widget_scale_get(sd->parent_obj);
if (sd->scale == 0.0)
{
if (sd->parent_obj)
return elm_widget_scale_get(sd->parent_obj);
else
return elm_scale_get();
}
return sd->scale;
}