From c3bf851fc3ae648b99f26430afe7a328044ed59b Mon Sep 17 00:00:00 2001 From: "minho.sun" Date: Tue, 1 Aug 2017 10:20:04 +0900 Subject: [PATCH] Revert "[Tizen] Temporary Fix to return the Layer as a View when Parent is a Layer." This reverts commit 3ebc379270d1019ed30da5f6db80b480f7136021. Change-Id: I218cf912af0847c3a84b361e113fb779727f81d5 --- src/Tizen.NUI/src/public/BaseComponents/View.cs | 22 +--------------------- src/Tizen.NUI/src/public/BaseHandle.cs | 11 +++-------- 2 files changed, 4 insertions(+), 29 deletions(-) diff --git a/src/Tizen.NUI/src/public/BaseComponents/View.cs b/src/Tizen.NUI/src/public/BaseComponents/View.cs index 2e38f1f..7c51b00 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/View.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/View.cs @@ -2123,7 +2123,7 @@ namespace Tizen.NUI.BaseComponents return ret; } - /*internal View GetParent() + internal View GetParent() { View ret; IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr); @@ -2142,26 +2142,6 @@ namespace Tizen.NUI.BaseComponents if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; - }*/ - - internal View GetParent() - { - View ret; - IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr); - - BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr); - - if(basehandle is Layer) - { - View ret2 = new View(cPtr,false); - return ret2; - } - - ret = basehandle as View; - - if (NDalicPINVOKE.SWIGPendingException.Pending) - throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; } internal void SetParentOrigin(Vector3 origin) diff --git a/src/Tizen.NUI/src/public/BaseHandle.cs b/src/Tizen.NUI/src/public/BaseHandle.cs index 3088fb7..69d904e 100755 --- a/src/Tizen.NUI/src/public/BaseHandle.cs +++ b/src/Tizen.NUI/src/public/BaseHandle.cs @@ -26,7 +26,6 @@ namespace Tizen.NUI internal BaseHandle(global::System.IntPtr cPtr, bool cMemoryOwn) { _registerMe = swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); // using copy constructor to create another native handle so Registry.Unregister works fine. @@ -42,22 +41,18 @@ namespace Tizen.NUI internal BaseHandle(global::System.IntPtr cPtr) { _registerMe = swigCMemOwn = true; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); // using copy constructor to create another native handle so Registry.Unregister works fine. swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, NDalicPINVOKE.new_BaseHandle__SWIG_2(swigCPtr)); - if (_registerMe) - { - // Register this instance of BaseHandle in the registry. - Registry.Register(this); - } + // Register this instance of BaseHandle in the registry. + Registry.Register(this); } internal BaseHandle(global::System.IntPtr cPtr) { - _registerMe = swigCMemOwn = true; + swigCMemOwn = true; swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); // Register this instance of BaseHandle in the registry. -- 2.7.4