forked from enlightenment/efl
fix bug if pan has been deleted - sd wil lbe null.
SVN revision: 62821
This commit is contained in:
parent
4ad7d687ff
commit
6c41db98dd
|
@ -2539,6 +2539,7 @@ _pan_set(Evas_Object *obj,
|
|||
Pan *sd = evas_object_smart_data_get(obj);
|
||||
Item_Block *itb;
|
||||
|
||||
if (!sd) return;
|
||||
// Evas_Coord ow, oh;
|
||||
// evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
|
||||
// ow = sd->wd->minw - ow;
|
||||
|
@ -2582,6 +2583,7 @@ _pan_get(Evas_Object *obj,
|
|||
{
|
||||
Pan *sd = evas_object_smart_data_get(obj);
|
||||
|
||||
if (!sd) return;
|
||||
if (x) *x = sd->wd->pan_x;
|
||||
if (y) *y = sd->wd->pan_y;
|
||||
}
|
||||
|
@ -2594,6 +2596,7 @@ _pan_max_get(Evas_Object *obj,
|
|||
Pan *sd = evas_object_smart_data_get(obj);
|
||||
Evas_Coord ow, oh;
|
||||
|
||||
if (!sd) return;
|
||||
evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
|
||||
ow = sd->wd->minw - ow;
|
||||
if (ow < 0) ow = 0;
|
||||
|
@ -2619,6 +2622,7 @@ _pan_child_size_get(Evas_Object *obj,
|
|||
{
|
||||
Pan *sd = evas_object_smart_data_get(obj);
|
||||
|
||||
if (!sd) return;
|
||||
if (w) *w = sd->wd->minw;
|
||||
if (h) *h = sd->wd->minh;
|
||||
}
|
||||
|
@ -2656,6 +2660,7 @@ static void
|
|||
_pan_resize_job(void *data)
|
||||
{
|
||||
Pan *sd = data;
|
||||
if (!sd) return;
|
||||
_sizing_eval(sd->wd->obj);
|
||||
sd->resize_job = NULL;
|
||||
}
|
||||
|
@ -2668,6 +2673,7 @@ _pan_resize(Evas_Object *obj,
|
|||
Pan *sd = evas_object_smart_data_get(obj);
|
||||
Evas_Coord ow, oh;
|
||||
|
||||
if (!sd) return;
|
||||
evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
|
||||
if ((ow == w) && (oh == h)) return;
|
||||
if ((sd->wd->height_for_width) && (ow != w))
|
||||
|
@ -2689,6 +2695,7 @@ _pan_calculate(Evas_Object *obj)
|
|||
Elm_Genlist_Item *git;
|
||||
Eina_List *l;
|
||||
|
||||
if (!sd) return;
|
||||
evas_event_freeze(evas_object_evas_get(obj));
|
||||
evas_object_geometry_get(obj, &ox, &oy, &ow, &oh);
|
||||
evas_output_viewport_get(evas_object_evas_get(obj), &cvx, &cvy, &cvw, &cvh);
|
||||
|
@ -2737,6 +2744,7 @@ _pan_move(Evas_Object *obj,
|
|||
{
|
||||
Pan *sd = evas_object_smart_data_get(obj);
|
||||
|
||||
if (!sd) return;
|
||||
if (sd->wd->calc_job) ecore_job_del(sd->wd->calc_job);
|
||||
sd->wd->calc_job = ecore_job_add(_calc_job, sd->wd);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue