Browse Source

The current view is called once instead of being called for each SubView added.

BDisp 5 năm trước cách đây
mục cha
commit
3eeb1d8b52
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      Terminal.Gui/Core/View.cs

+ 2 - 2
Terminal.Gui/Core/View.cs

@@ -951,7 +951,7 @@ namespace Terminal.Gui {
 		/// <param name="view">The subview being added.</param>
 		public virtual void OnAdding (View view)
 		{
-			Adding?.Invoke (view);
+			view.Adding?.Invoke (this);
 		}
 
 		/// <summary>
@@ -960,7 +960,7 @@ namespace Terminal.Gui {
 		/// <param name="view">The subview being removed.</param>
 		public virtual void OnRemoving (View view)
 		{
-			Removing?.Invoke (view);
+			view.Removing?.Invoke (this);
 		}
 
 		/// <inheritdoc/>