Explorar o código

Fixes the Clear method.

BDisp %!s(int64=2) %!d(string=hai) anos
pai
achega
006f57b0eb
Modificáronse 1 ficheiros con 2 adicións e 9 borrados
  1. 2 9
      Terminal.Gui/Core/View.cs

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

@@ -1110,15 +1110,8 @@ namespace Terminal.Gui {
 		/// </remarks>
 		/// </remarks>
 		public void Clear ()
 		public void Clear ()
 		{
 		{
-			Rect containerBounds = GetContainerBounds ();
-			Rect viewBounds = Bounds;
-			if (!containerBounds.IsEmpty) {
-				viewBounds.Width = Math.Min (viewBounds.Width, containerBounds.Width);
-				viewBounds.Height = Math.Min (viewBounds.Height, containerBounds.Height);
-			}
-
-			var h = viewBounds.Height;
-			var w = viewBounds.Width;
+			var h = Frame.Height;
+			var w = Frame.Width;
 			for (var line = 0; line < h; line++) {
 			for (var line = 0; line < h; line++) {
 				Move (0, line);
 				Move (0, line);
 				for (var col = 0; col < w; col++)
 				for (var col = 0; col < w; col++)