소스 검색

move the pos init to constructor

Charlie Kindel 5 년 전
부모
커밋
6cac4e5d46
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      Terminal.Gui/Core/View.cs

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

@@ -285,8 +285,8 @@ namespace Terminal.Gui {
 			}
 		}
 
-		Pos x = Pos.At (0);
-		Pos y = Pos.At (0);
+		Pos x, y;
+
 		/// <summary>
 		/// Gets or sets the X position for the view (the column). Only used whe <see cref="LayoutStyle"/> is <see cref="LayoutStyle.Computed"/>.
 		/// </summary>
@@ -383,6 +383,8 @@ namespace Terminal.Gui {
 		{
 			CanFocus = false;
 			LayoutStyle = LayoutStyle.Computed;
+			x = Pos.At (0);
+			y = Pos.At (0);
 			Height = 0;
 			Width = 0;
 		}