summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2010-04-21 00:17:48 +0200
committerGraeme Geldenhuys <graemeg@gmail.com>2010-04-21 00:17:48 +0200
commit6a38a1bda815f0a40ab4fc16172da215d1a64186 (patch)
treeb3e790e1ac4257a713b223d1b91f31811e1169c2
parent3bc2cdaed5cf71e429ee16788919f5d4a576bf54 (diff)
downloadfpGUI-6a38a1bda815f0a40ab4fc16172da215d1a64186.tar.xz
Grid.OnDrawCell: The drawstate set was not correctly reset after each loop.
This caused the OnDrawCell AFlags variable to always contain gdSelected and gdFocused - which made OnDrawCell event handlers rather useless. This is now fixed!
-rw-r--r--src/gui/fpg_basegrid.pas2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/fpg_basegrid.pas b/src/gui/fpg_basegrid.pas
index 50b17055..934bd382 100644
--- a/src/gui/fpg_basegrid.pas
+++ b/src/gui/fpg_basegrid.pas
@@ -560,7 +560,6 @@ var
clipr: TfpgRect; // clip rectangle
drawstate: TfpgGridDrawState;
begin
- drawstate := [];
Canvas.BeginDraw;
// inherited HandlePaint;
Canvas.ClearClipRect;
@@ -605,6 +604,7 @@ begin
r.Left := FMargin;
for col := FFirstCol to ColumnCount-1 do
begin
+ drawstate := [];
r.Width := ColumnWidth[col];
Canvas.SetClipRect(clipr);