diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-07-27 14:57:50 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-07-27 14:57:50 +0200 |
commit | 68c45f069b28c1abd487f7c42387fa6ed445ac63 (patch) | |
tree | bfd5a8a453458596db81be057ae8fcdc774c9cc2 /src/gui | |
parent | 97c383a404af0cc9c76a89b14eee89cf47ea882f (diff) | |
download | fpGUI-68c45f069b28c1abd487f7c42387fa6ed445ac63.tar.xz |
BaseGrid.HandleKeyPress and consume variable behaviour has changed.
Old behaviour we simply forced Consumed = True and later Consumed = False.
This has a very good chance of overwriting the origin consume value. We now
only set consume to True, if it is really so.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/fpg_basegrid.pas | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/gui/fpg_basegrid.pas b/src/gui/fpg_basegrid.pas index c97122e4..1b45cfdf 100644 --- a/src/gui/fpg_basegrid.pas +++ b/src/gui/fpg_basegrid.pas @@ -828,7 +828,9 @@ var w: integer; r: integer; begin - consumed := True; + if consumed then + exit; + case keycode of keyRight: begin @@ -851,6 +853,7 @@ begin FollowFocus; RePaint; end; + consumed := True; end; keyLeft: @@ -863,6 +866,7 @@ begin FollowFocus; RePaint; end; + consumed := True; end; keyUp: @@ -873,6 +877,7 @@ begin FollowFocus; RePaint; end; + consumed := True; end; keyDown: @@ -883,6 +888,7 @@ begin FollowFocus; RePaint; end; + consumed := True; end; keyPageUp: @@ -897,6 +903,7 @@ begin FollowFocus; RePaint; end; + consumed := True; end; keyPageDown: @@ -911,6 +918,7 @@ begin FollowFocus; RePaint; end; + consumed := True; end; keyHome: @@ -930,6 +938,7 @@ begin FollowFocus; RePaint; end; + consumed := True; end; keyEnd: @@ -949,11 +958,9 @@ begin FollowFocus; RePaint; end; + consumed := True; end; - - else - consumed := False; - end; + end; { case } if consumed then CheckFocusChange; |