diff --git a/Terminal.Gui/View/Layout/ViewLayout.cs b/Terminal.Gui/View/Layout/ViewLayout.cs index 4be2faf4c..771249f16 100644 --- a/Terminal.Gui/View/Layout/ViewLayout.cs +++ b/Terminal.Gui/View/Layout/ViewLayout.cs @@ -66,7 +66,7 @@ public partial class View { if (_frame == value) { - return; + //return; } _frame = value with { Width = Math.Max (value.Width, 0), Height = Math.Max (value.Height, 0) }; @@ -169,7 +169,7 @@ public partial class View if (Equals (_x, value)) { - return; + //return; } OnResizeNeeded (); } @@ -205,7 +205,7 @@ public partial class View { if (Equals (_y, value)) { - return; + //return; } _y = value ?? throw new ArgumentNullException (nameof (value), @$"{nameof (Y)} cannot be null"); @@ -243,7 +243,7 @@ public partial class View { if (Equals (_height, value)) { - return; + //return; } _height = value ?? throw new ArgumentNullException (nameof (value), @$"{nameof (Height)} cannot be null"); @@ -298,7 +298,7 @@ public partial class View { if (Equals (_width, value)) { - return; + // return; } _width = value ?? throw new ArgumentNullException (nameof (value), @$"{nameof (Width)} cannot be null"); diff --git a/UnitTests/View/Layout/ToScreenTests.cs b/UnitTests/View/Layout/ToScreenTests.cs index b21f1aee6..597080a5b 100644 --- a/UnitTests/View/Layout/ToScreenTests.cs +++ b/UnitTests/View/Layout/ToScreenTests.cs @@ -550,7 +550,8 @@ public class ToScreenTests (ITestOutputHelper output) View view = new () { Width = 10, - Height = 10 + Height = 10, + ScrollSettings = ScrollSettings.NoRestrict }; Rectangle testRect = new Rectangle (0, 0, 1, 1); diff --git a/UnitTests/View/Layout/ViewportTests.cs b/UnitTests/View/Layout/ViewportTests.cs index 3bda94c1a..46ef469e6 100644 --- a/UnitTests/View/Layout/ViewportTests.cs +++ b/UnitTests/View/Layout/ViewportTests.cs @@ -160,7 +160,8 @@ public class ViewportTests (ITestOutputHelper output) View view = new () { Width = 10, - Height = 10 + Height = 10, + ScrollSettings = ScrollSettings.NoRestrict }; Assert.Equal (new Rectangle (0, 0, 10, 10), view.Frame);