summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2011-08-24 12:08:09 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2011-08-24 12:08:09 +0200
commit109bc97912a2197c9d2166bcdeed8ef9f714c102 (patch)
treec4b7093106d70b96fec1e87ad8184d3a1a18b0dc /src
parent4d6aa18425807fc9a14455874fdc6800c563f76a (diff)
downloadfpGUI-109bc97912a2197c9d2166bcdeed8ef9f714c102.tar.xz
bugfix in PageControl keypress handling. Consume incorrectly set.
We incorrectly set the consumed variable, and called inherited unnecessarily. This is now improved.
Diffstat (limited to 'src')
-rw-r--r--src/gui/fpg_tab.pas10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gui/fpg_tab.pas b/src/gui/fpg_tab.pas
index 5cdb7396..c5bd9273 100644
--- a/src/gui/fpg_tab.pas
+++ b/src/gui/fpg_tab.pas
@@ -1140,8 +1140,6 @@ procedure TfpgPageControl.HandleKeyPress(var keycode: word;
var
i: integer;
begin
-// writeln(Classname, '.Keypress');
- consumed := True;
i := ActivePageIndex;
if ssAlt in shiftstate then
case keycode of
@@ -1150,6 +1148,7 @@ begin
if ActivePage <> TfpgTabSheet(FPages.First) then
begin
ActivePage := TfpgTabSheet(FPages[i-1]);
+ consumed := True;
end;
end;
@@ -1158,13 +1157,12 @@ begin
if ActivePage <> TfpgTabSheet(FPages.Last) then
begin
ActivePage := TfpgTabSheet(FPages[i+1]);
+ consumed := True;
end;
end;
-
- else
- consumed := False;
end; { case/else }
- inherited HandleKeyPress(keycode, shiftstate, consumed);
+ if not consumed then
+ inherited HandleKeyPress(keycode, shiftstate, consumed);
end;
procedure TfpgPageControl.RePaint;