summaryrefslogtreecommitdiff
path: root/legacy/edje/src/bin/edje_cc_out.c
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2012-12-18 13:54:02 +0000
committerDaniel Zaoui <daniel.zaoui@yahoo.com>2012-12-18 13:54:02 +0000
commitf8450a72249372babb2ff458d74eee793d05f96a (patch)
treef0a9af76405aea169140d66178ae7cc754cc30a1 /legacy/edje/src/bin/edje_cc_out.c
parentba8b15bcff1ab601f1acf6c862f338f90656078a (diff)
Fix for edje_cc that didn't like insertion of element before the first element
Signed-off-by: Daniel Zaoui <daniel.zaoui@samsung.com> SVN revision: 81252
Diffstat (limited to '')
-rw-r--r--legacy/edje/src/bin/edje_cc_out.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/legacy/edje/src/bin/edje_cc_out.c b/legacy/edje/src/bin/edje_cc_out.c
index bd331724b4..ec12ab53f6 100644
--- a/legacy/edje/src/bin/edje_cc_out.c
+++ b/legacy/edje/src/bin/edje_cc_out.c
@@ -1679,7 +1679,9 @@ reorder_parts(void)
1679 if (ep2->reorder.linked_prev) 1679 if (ep2->reorder.linked_prev)
1680 ERR("Unable to insert two or more parts in same part \"%s\".", 1680 ERR("Unable to insert two or more parts in same part \"%s\".",
1681 pc->parts[j]->name); 1681 pc->parts[j]->name);
1682 k = j - 1; 1682 /* Need it to be able to insert an element before the first */
1683 if (j == 0) k = 0;
1684 else k = j - 1;
1683 found = EINA_TRUE; 1685 found = EINA_TRUE;
1684 ep2->reorder.linked_prev += ep->reorder.linked_prev + 1; 1686 ep2->reorder.linked_prev += ep->reorder.linked_prev + 1;
1685 ep->reorder.before = (Edje_Part_Parser *)pc->parts[j]; 1687 ep->reorder.before = (Edje_Part_Parser *)pc->parts[j];
@@ -1728,10 +1730,10 @@ reorder_parts(void)
1728 } 1730 }
1729 if (i > k) 1731 if (i > k)
1730 { 1732 {
1731 for (j = i - ep->reorder.linked_prev - 1 ; j >= k ; j--) 1733 for (j = i - ep->reorder.linked_prev ; j > k; j--)
1732 { 1734 {
1733 pc->parts[j + amount] = pc->parts[j]; 1735 pc->parts[j + amount - 1] = pc->parts[j - 1];
1734 pc->parts[j + amount]->id = j + amount; 1736 pc->parts[j + amount - 1]->id = j + amount - 1;
1735 } 1737 }
1736 for (j = 0 ; j < amount ; j++) 1738 for (j = 0 ; j < amount ; j++)
1737 { 1739 {