浏览代码

Remove unnecessary conditional statement.

BDisp 8 月之前
父节点
当前提交
be0832febb
共有 1 个文件被更改,包括 4 次插入7 次删除
  1. 4 7
      Terminal.Gui/Views/TabView/TabRowView.cs

+ 4 - 7
Terminal.Gui/Views/TabView/TabRowView.cs

@@ -113,17 +113,14 @@ internal class TabRowView : View
         base.OnHasFocusChanged (newHasFocus, previousFocusedView, focusedView);
     }
 
-    /// <inheritdoc />
+    /// <inheritdoc/>
     protected override void OnSubviewLayout (LayoutEventArgs args)
     {
-        if (NeedsLayout)
-        {
-            _host._tabLocations = _host.CalculateViewport (Viewport).ToArray ();
+        _host._tabLocations = _host.CalculateViewport (Viewport).ToArray ();
 
-            RenderTabLine ();
+        RenderTabLine ();
 
-            RenderUnderline ();
-        }
+        RenderUnderline ();
 
         base.OnSubviewLayout (args);
     }