[NUI] Fix reparenting of Child bug (#1314)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Layouting / LayoutItem.cs
index a4518fb..b57889b 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -51,6 +51,8 @@ namespace Tizen.NUI
         private Extents _padding;
         private Extents _margin;
 
+        private bool parentReplacement = false;
+
         /// <summary>
         /// [Draft] Condition event that is causing this Layout to transition.
         /// </summary>
@@ -303,6 +305,21 @@ namespace Tizen.NUI
             }
         }
 
+        internal void SetReplaceFlag()
+        {
+            parentReplacement = true;
+        }
+
+        internal bool IsReplaceFlag()
+        {
+            return parentReplacement;
+        }
+
+        internal void ClearReplaceFlag()
+        {
+            parentReplacement = false;
+        }
+
         /// <summary>
         /// Get the measured width (without any measurement flags).<br />
         /// This method should be used only during measurement and layout calculations.<br />