Skip to content

Commit 017c8f7

Browse files
committed
Fixed up PR #1989
1 parent e3e6084 commit 017c8f7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

garrysmod/lua/vgui/dlistview.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,15 +280,18 @@ function PANEL:DataLayout()
280280
local y = 0
281281
local h = self.m_iDataHeight
282282

283+
local alt = false
283284
for k, Line in ipairs( self.Sorted ) do
284285

286+
if ( !Line:IsVisible() ) then continue end
287+
285288
Line:SetPos( 1, y )
286289
Line:SetSize( self:GetWide() - 2, h )
287290
Line:DataLayout( self )
288291

289-
Line:SetAltLine( k % 2 == 1 )
292+
Line:SetAltLine( alt )
293+
alt = !alt
290294

291-
if ( !Line:IsVisible() ) then continue end
292295
y = y + Line:GetTall()
293296

294297
end

0 commit comments

Comments
 (0)