Browse Source

Removed unnecessary code.

BDisp 4 years ago
parent
commit
bb67b5ad07
1 changed files with 1 additions and 6 deletions
  1. 1 6
      Terminal.Gui/Views/Button.cs

+ 1 - 6
Terminal.Gui/Views/Button.cs

@@ -149,12 +149,7 @@ namespace Terminal.Gui {
 				Width = w;
 			} catch (Exception) {
 				// It's a Dim.DimCombine and so can't be assigned. Let it have it's own anchor.
-				var width = Width;
-				LayoutStyle = LayoutStyle.Absolute;
-				Width = w;
-				LayoutStyle = LayoutStyle.Computed;
-				Width = width;
-				w = width.Anchor (w);
+				w = Width.Anchor (w);
 			}
 			Height = 1;
 			Frame = new Rect (Frame.Location, new Size (w, 1));