* edje: fix rename of a part.
authorcedric <cedric>
Fri, 30 Jul 2010 09:08:37 +0000 (09:08 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 30 Jul 2010 09:08:37 +0000 (09:08 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@50684 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/edje_edit.c

index 9e692de..8498688 100644 (file)
@@ -664,7 +664,8 @@ _edje_fix_parts_id(Edje *ed)
 
        //printf(" [%d]Checking part: %s id: %d\n", correct_id, p->name, p->id);
        if (p->id != correct_id)
-         _edje_part_id_set(ed, ed->table_parts[p->id], correct_id);
+         if (ed->table_parts[p->id])
+           _edje_part_id_set(ed, ed->table_parts[p->id], correct_id);
 
        correct_id++;
      }
@@ -1031,13 +1032,11 @@ edje_edit_group_name_set(Evas_Object *obj, const char *new_name)
    //if (pc->part && ed->file->free_strings) eina_stringshare_del(pc->part); TODO FIXME
    pce = eina_hash_find(ed->file->collection, pc->part);
 
-   eina_hash_del(ed->file->collection, pce->entry, pce);
+   eina_hash_move(ed->file->collection, pce->entry, new_name);
 
    pce->entry = eina_stringshare_add(new_name);
    pc->part = pce->entry;
 
-   eina_hash_add(ed->file->collection, pce->entry, pce);
-
    return EINA_FALSE;
 }