summaryrefslogtreecommitdiff
path: root/ElmSharp
diff options
context:
space:
mode:
Diffstat (limited to 'ElmSharp')
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/ItemObject.cs5
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;