enventor_smart: fix mirror mode for relative_to

Summary:
When we apply mirror mode, we need to considering swap relative_to,
but exist code was not checking null pointer.
so I fixed the logic.

Test Plan:
1. Launch Enventor
2. Apply Mirror Mode
3. Insert a live edit item with relative_set setting

Reviewers: Hermet, Jaehyun_Cho, NikaWhite

Differential Revision: https://phab.enlightenment.org/D3942
This commit is contained in:
Taehyub Kim 2016-05-16 23:28:30 +09:00 committed by Hermet Park
parent 9ab099dd4c
commit afd04c7469
1 changed files with 4 additions and 5 deletions

View File

@ -843,12 +843,11 @@ _enventor_object_template_part_insert(Eo *obj EINA_UNUSED,
align_x = 1.0;
else if (align_x == 1.0)
align_x = 0.0;
char buf[1024];
strcpy(buf, rel1_x_to);
strcpy(rel1_x_to, rel2_x_to);
strcpy(rel2_x_to, buf);
char *buf;
buf = rel1_x_to;
rel1_x_to = rel2_x_to;
rel2_x_to = buf;
}
return template_part_insert(pd->main_it.ed, part, insert_type,