summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVorobiov Vitalii <vi.vorobiov@samsung.com>2013-11-12 11:18:22 +0900
committerCedric Bail <cedric.bail@samsung.com>2013-11-12 11:18:22 +0900
commitd2ff8d70a5d88307a1567f92c910abc0d9c4c272 (patch)
treec68d09999408babec8b85398e643a0788758006e /src
parentc101d855419b26196121ac40b8d7cc421613310c (diff)
edje: fixing the check whether the part is swallow.
Summary: Some functions doesn't checking the part right. For example: edje_edit_part_clip_to_set edje_edit_part_restack_below edje_edit_part_restack_above edje_edit_part_source_set Reviewers: cedric, seoz Reviewed By: cedric CC: reutskiy.v.v, cedric Differential Revision: https://phab.enlightenment.org/D325
Diffstat (limited to 'src')
-rw-r--r--src/lib/edje/edje_edit.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index c7997cd8fb..c0584f2299 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -2212,7 +2212,7 @@ edje_edit_part_restack_below(Evas_Object *obj, const char* part)
2212 _edje_parts_id_switch(ed, rp, prev); 2212 _edje_parts_id_switch(ed, rp, prev);
2213 2213
2214 evas_object_stack_below(rp->object, prev->object); 2214 evas_object_stack_below(rp->object, prev->object);
2215 if (rp->typedata.swallow->swallowed_object) 2215 if ((rp->typedata.swallow) && (rp->typedata.swallow->swallowed_object))
2216 evas_object_stack_above(rp->typedata.swallow->swallowed_object, rp->object); 2216 evas_object_stack_above(rp->typedata.swallow->swallowed_object, rp->object);
2217 2217
2218 _edje_edit_flag_script_dirty(eed, EINA_TRUE); 2218 _edje_edit_flag_script_dirty(eed, EINA_TRUE);
@@ -2247,7 +2247,7 @@ edje_edit_part_restack_above(Evas_Object *obj, const char* part)
2247 _edje_parts_id_switch(ed, rp, next); 2247 _edje_parts_id_switch(ed, rp, next);
2248 2248
2249 evas_object_stack_above(rp->object, next->object); 2249 evas_object_stack_above(rp->object, next->object);
2250 if (rp->typedata.swallow->swallowed_object) 2250 if ((rp->typedata.swallow) && (rp->typedata.swallow->swallowed_object))
2251 evas_object_stack_above(rp->typedata.swallow->swallowed_object, rp->object); 2251 evas_object_stack_above(rp->typedata.swallow->swallowed_object, rp->object);
2252 2252
2253 _edje_edit_flag_script_dirty(eed, EINA_TRUE); 2253 _edje_edit_flag_script_dirty(eed, EINA_TRUE);
@@ -2322,8 +2322,6 @@ edje_edit_part_clip_to_set(Evas_Object *obj, const char *part, const char *clip_
2322 /* unset clipping */ 2322 /* unset clipping */
2323 if (!clip_to) 2323 if (!clip_to)
2324 { 2324 {
2325 //printf("UnSet clip_to for part: %s\n", part);
2326
2327 if (rp->part->clip_to_id >= 0) 2325 if (rp->part->clip_to_id >= 0)
2328 { 2326 {
2329 clip = ed->table_parts[rp->part->clip_to_id % ed->table_parts_size]; 2327 clip = ed->table_parts[rp->part->clip_to_id % ed->table_parts_size];
@@ -2334,8 +2332,8 @@ edje_edit_part_clip_to_set(Evas_Object *obj, const char *part, const char *clip_
2334 } 2332 }
2335 2333
2336 evas_object_clip_set(rp->object, ed->base->clipper); 2334 evas_object_clip_set(rp->object, ed->base->clipper);
2337 if (rp->typedata.swallow->swallowed_object) 2335 if ((rp->typedata.swallow) && (rp->typedata.swallow->swallowed_object))
2338 evas_object_clip_set(rp->typedata.swallow->swallowed_object, ed->base->clipper); 2336 evas_object_clip_set(rp->typedata.swallow->swallowed_object, ed->base->clipper);
2339 2337
2340 rp->part->clip_to_id = -1; 2338 rp->part->clip_to_id = -1;
2341 2339
@@ -2361,7 +2359,7 @@ edje_edit_part_clip_to_set(Evas_Object *obj, const char *part, const char *clip_
2361 evas_object_pass_events_set(clip->object, 1); 2359 evas_object_pass_events_set(clip->object, 1);
2362 evas_object_pointer_mode_set(clip->object, EVAS_OBJECT_POINTER_MODE_NOGRAB); 2360 evas_object_pointer_mode_set(clip->object, EVAS_OBJECT_POINTER_MODE_NOGRAB);
2363 evas_object_clip_set(rp->object, clip->object); 2361 evas_object_clip_set(rp->object, clip->object);
2364 if (rp->typedata.swallow->swallowed_object) 2362 if ((rp->typedata.swallow) && (rp->typedata.swallow->swallowed_object))
2365 evas_object_clip_set(rp->typedata.swallow->swallowed_object, clip->object); 2363 evas_object_clip_set(rp->typedata.swallow->swallowed_object, clip->object);
2366 2364
2367 edje_object_calc_force(obj); 2365 edje_object_calc_force(obj);
@@ -2483,7 +2481,7 @@ edje_edit_part_source_set(Evas_Object *obj, const char *part, const char *source
2483 2481
2484 _edje_if_string_free(ed, rp->part->source); 2482 _edje_if_string_free(ed, rp->part->source);
2485 2483
2486 if (rp->typedata.swallow->swallowed_object) 2484 if ((rp->typedata.swallow) && (rp->typedata.swallow->swallowed_object))
2487 { 2485 {
2488 _edje_real_part_swallow_clear(ed, rp); 2486 _edje_real_part_swallow_clear(ed, rp);
2489 evas_object_del(rp->typedata.swallow->swallowed_object); 2487 evas_object_del(rp->typedata.swallow->swallowed_object);