From 017c8f7eea2d0f95bacc87534e417194998a564c Mon Sep 17 00:00:00 2001 From: Rubat <3299036+robotboy655@users.noreply.github.com> Date: Fri, 7 Jul 2023 22:28:40 +0300 Subject: [PATCH] Fixed up PR #1989 --- garrysmod/lua/vgui/dlistview.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/garrysmod/lua/vgui/dlistview.lua b/garrysmod/lua/vgui/dlistview.lua index f9761f90be..4a2fc42462 100644 --- a/garrysmod/lua/vgui/dlistview.lua +++ b/garrysmod/lua/vgui/dlistview.lua @@ -280,15 +280,18 @@ function PANEL:DataLayout() local y = 0 local h = self.m_iDataHeight + local alt = false for k, Line in ipairs( self.Sorted ) do + if ( !Line:IsVisible() ) then continue end + Line:SetPos( 1, y ) Line:SetSize( self:GetWide() - 2, h ) Line:DataLayout( self ) - Line:SetAltLine( k % 2 == 1 ) + Line:SetAltLine( alt ) + alt = !alt - if ( !Line:IsVisible() ) then continue end y = y + Line:GetTall() end