diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2015-06-18 15:07:21 +0100 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2015-06-18 15:07:21 +0100 |
commit | d7074ce47f35fd379c7e4dd7894992dbe258b124 (patch) | |
tree | 8aaaad88792b7cbb8c0ddaf4f17fd823ef5c6e95 | |
parent | 81648ad759b14c66f47ed9eaa7b0c2163f0c6ee4 (diff) | |
parent | 132d78ca3ce5557a69d7f513b9c73fdad685ecba (diff) | |
download | fpGUI-d7074ce47f35fd379c7e4dd7894992dbe258b124.tar.xz |
Merge branch 'hotfix/keypress' into fixes_1.4
-rw-r--r-- | src/gui/fpg_edit.pas | 5 | ||||
-rw-r--r-- | src/gui/fpg_memo.pas | 13 |
2 files changed, 8 insertions, 10 deletions
diff --git a/src/gui/fpg_edit.pas b/src/gui/fpg_edit.pas index 6bc3cc7c..1ddce281 100644 --- a/src/gui/fpg_edit.pas +++ b/src/gui/fpg_edit.pas @@ -1,7 +1,7 @@ { fpGUI - Free Pascal GUI Toolkit - Copyright (C) 2006 - 2013 See the file AUTHORS.txt, included in this + Copyright (C) 2006 - 2015 See the file AUTHORS.txt, included in this distribution, for details of the copyright. See the file COPYING.modifiedLGPL, included in this distribution, @@ -933,8 +933,7 @@ begin end; end; { if } - if not consumed then - inherited HandleKeyPress(keycode, shiftstate, consumed); + inherited HandleKeyPress(keycode, shiftstate, consumed); if hasChanged then DoOnChange; diff --git a/src/gui/fpg_memo.pas b/src/gui/fpg_memo.pas index 7ec6163c..0e5079c1 100644 --- a/src/gui/fpg_memo.pas +++ b/src/gui/fpg_memo.pas @@ -1,7 +1,7 @@ { fpGUI - Free Pascal GUI Toolkit - Copyright (C) 2006 - 2013 See the file AUTHORS.txt, included in this + Copyright (C) 2006 - 2015 See the file AUTHORS.txt, included in this distribution, for details of the copyright. See the file COPYING.modifiedLGPL, included in this distribution, @@ -1108,8 +1108,7 @@ begin RePaint; end; -procedure TfpgMemo.HandleKeyPress(var keycode: word; - var shiftstate: TShiftState; var consumed: boolean); +procedure TfpgMemo.HandleKeyPress(var keycode: word; var shiftstate: TShiftState; var consumed: boolean); var cx: integer; ls: string; @@ -1347,14 +1346,14 @@ begin end; end; - if Consumed then - RePaint - else - inherited; + inherited HandleKeyPress(keycode, shiftstate, consumed); if hasChanged then if Assigned(FOnChange) then FOnChange(self); + + if Consumed then + RePaint; end; procedure TfpgMemo.HandleLMouseDown(x, y: integer; shiftstate: TShiftState); |