From 0937d7b9468bca74ef2feac8ba4f5aba8768431e Mon Sep 17 00:00:00 2001 From: sachiel Date: Tue, 10 Aug 2010 21:54:50 +0000 Subject: [PATCH] Properly store data values when changing them git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@50976 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/edje_edit.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lib/edje_edit.c b/src/lib/edje_edit.c index 156323b..f808593 100644 --- a/src/lib/edje_edit.c +++ b/src/lib/edje_edit.c @@ -1243,6 +1243,7 @@ edje_edit_group_data_value_set(Evas_Object *obj, const char *key, const char *va old_value = eina_hash_find(ed->collection->data, key); if (old_value) { + value = eina_stringshare_add(value); eina_hash_modify(ed->collection->data, key, value); _edje_if_string_free(ed, old_value); return EINA_TRUE; @@ -1261,9 +1262,14 @@ edje_edit_data_value_set(Evas_Object *obj, const char *itemname, const char *val if (!itemname || !value || !ed->file || !ed->file->data) return EINA_FALSE; - old = eina_hash_modify(ed->file->data, itemname, eina_stringshare_add(value)); + old = eina_hash_find(ed->file->data, itemname); if (old) - return EINA_TRUE; + { + value = eina_stringshare_add(value); + eina_hash_modify(ed->file->data, itemname, value); + _edje_if_string_free(ed, old); + return EINA_TRUE; + } return EINA_FALSE; } -- 2.7.4