diff options
author | SungHyun Min <shyun.min@samsung.com> | 2016-10-27 10:30:36 +0900 |
---|---|---|
committer | SungHyun Min <shyun.min@samsung.com> | 2016-10-27 10:30:55 +0900 |
commit | 5bc682ee2438cce6ac7c7d7ef4b76a7b8569e0ef (patch) | |
tree | 0d4721642ae41018fc39a2f1182c372ed104abfc /ElmSharp | |
parent | dbd7327972325d3c53fe8b8e74b4bfbfde8cf097 (diff) | |
download | elm-sharp-5bc682ee2438cce6ac7c7d7ef4b76a7b8569e0ef.tar.gz elm-sharp-5bc682ee2438cce6ac7c7d7ef4b76a7b8569e0ef.tar.bz2 elm-sharp-5bc682ee2438cce6ac7c7d7ef4b76a7b8569e0ef.zip |
Modify SerPartContent to remove old content when content is null
Signed-off-by: SungHyun Min <shyun.min@samsung.com>
Change-Id: I668f5702bb9b9418f94fc44de1eab404d23277a6
Diffstat (limited to 'ElmSharp')
-rwxr-xr-x[-rw-r--r--] | ElmSharp/ElmSharp/ItemObject.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ElmSharp/ElmSharp/ItemObject.cs b/ElmSharp/ElmSharp/ItemObject.cs index fb44251..7843ef6 100644..100755 --- a/ElmSharp/ElmSharp/ItemObject.cs +++ b/ElmSharp/ElmSharp/ItemObject.cs @@ -77,9 +77,10 @@ namespace ElmSharp public void SetPartContent(string part, EvasObject content, bool preserveOldContent) { - if (preserveOldContent) + IntPtr oldContent = Interop.Elementary.elm_object_item_part_content_unset(Handle, part); + if (oldContent != IntPtr.Zero && !preserveOldContent) { - Interop.Elementary.elm_object_item_part_content_unset(Handle, part); + Interop.Evas.evas_object_del(oldContent); } Interop.Elementary.elm_object_item_part_content_set(Handle, part, content); _partContents[part ?? "__default__"] = content; |