Browse Source

Fixed OnResizeNeeded bug

Tig Kindel 1 year ago
parent
commit
7618438ee0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Terminal.Gui/View/Layout/ViewLayout.cs

+ 1 - 1
Terminal.Gui/View/Layout/ViewLayout.cs

@@ -616,7 +616,7 @@ public partial class View {
 
 
 		// First try SuperView.Bounds, then Application.Current.Bounds, then Application.Top, then Driver
 		// First try SuperView.Bounds, then Application.Current.Bounds, then Application.Top, then Driver
 		// Finally, if none of those are valid, use int.MaxValue (for Unit tests).
 		// Finally, if none of those are valid, use int.MaxValue (for Unit tests).
-		SetRelativeLayout (SuperView?.Bounds ?? Application.Current?.Bounds ?? Application.Top?.Bounds ?? Application.Driver?.Bounds ?? new Rect (0, 0, int.MaxValue, int.MaxValue));
+		SetRelativeLayout (SuperView?.Bounds ?? Application.Top?.Bounds ?? Application.Driver?.Bounds ?? new Rect (0, 0, int.MaxValue, int.MaxValue));
 
 
 		// TODO: Determine what, if any of the below is actually needed here.
 		// TODO: Determine what, if any of the below is actually needed here.
 		if (IsInitialized/* || LayoutStyle == LayoutStyle.Absolute*/) {
 		if (IsInitialized/* || LayoutStyle == LayoutStyle.Absolute*/) {