From 5187e4fceaefcdd450c6b268f4eb24fba6506d3b Mon Sep 17 00:00:00 2001 From: Bruce Steers Date: Sun, 12 Dec 2021 16:01:58 +0000 Subject: [PATCH] IconView.class: do not return before drawing background picture if no items are added. [GB.GUI.BASE] * BUG: IconView background image is now drawn if no icons are added. --- comp/src/gb.gui.base/.src/IconView/IconView.class | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/comp/src/gb.gui.base/.src/IconView/IconView.class b/comp/src/gb.gui.base/.src/IconView/IconView.class index acbc8e558..6efdc523f 100644 --- a/comp/src/gb.gui.base/.src/IconView/IconView.class +++ b/comp/src/gb.gui.base/.src/IconView/IconView.class @@ -429,19 +429,20 @@ Public Sub ScrollArea_Draw() Dim bRaiseDraw As Boolean Dim bFocus As Boolean - If $aItems.Count = 0 Then Return If $iLock Then Return - - bFocus = $hView.HasFocus - - hSaveClip = Paint.ClipRect - + If $hPicture Then Draw.FillX = -$hView.ScrollX Draw.FillY = -$hView.ScrollY Draw.Tile($hPicture, 0, 0, Draw.Width, Draw.Height) Endif + + If $aItems.Count = 0 Then Return + + bFocus = $hView.HasFocus + hSaveClip = Paint.ClipRect + bRaiseDraw = Object.CanRaise(Me, "Draw") X = hSaveClip.X + $hView.ScrollX