/*
- * 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.
// If child already has a parent then re-parent child
if (oldParent != null)
{
+ if (child.Layout !=null)
+ {
+ child.Layout.SetReplaceFlag();
+ }
oldParent.Remove(child);
}
child.InternalParent = this;
/*
- * 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.
{
if( childLayout == layoutItem )
{
- Window.Instance.LayoutController.AddToRemovalStack(childLayout);
+ if (! childLayout.IsReplaceFlag())
+ {
+ Window.Instance.LayoutController.AddToRemovalStack(childLayout);
+ }
+ childLayout.ClearReplaceFlag();
LayoutChildren.Remove(childLayout);
childLayout.ConditionForAnimation = childLayout.ConditionForAnimation | TransitionCondition.Remove;
// Add LayoutItem to the transition stack so can animate it out.
/*
- * 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.
private Extents _padding;
private Extents _margin;
+ private bool parentReplacement = false;
+
/// <summary>
/// [Draft] Condition event that is causing this Layout to transition.
/// </summary>
}
}
+ 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 />