mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-16 11:29:31 +02:00
Grids: Do not move to another cell when user presses Left/Right in editor. Issue #29084
git-svn-id: branches/fixes_1_6@50634 -
This commit is contained in:
parent
1de06d1f01
commit
77d0809361
@ -6897,15 +6897,23 @@ begin
|
||||
end else
|
||||
TabCheckEditorKey;
|
||||
VK_LEFT:
|
||||
if Relaxed then
|
||||
MoveSel(True, -cBidiMove[UseRightToLeftAlignment], 0)
|
||||
else
|
||||
MoveSel(True, 0,-1);
|
||||
//Don't move to another cell is user is editing
|
||||
if not FEditorKey then
|
||||
begin
|
||||
if Relaxed then
|
||||
MoveSel(True, -cBidiMove[UseRightToLeftAlignment], 0)
|
||||
else
|
||||
MoveSel(True, 0,-1);
|
||||
end;
|
||||
VK_RIGHT:
|
||||
if Relaxed then
|
||||
MoveSel(True, cBidiMove[UseRightToLeftAlignment], 0)
|
||||
else
|
||||
MoveSel(True, 0, 1);
|
||||
//Don't move to another cell is user is editing
|
||||
if not FEditorKey then
|
||||
begin
|
||||
if Relaxed then
|
||||
MoveSel(True, cBidiMove[UseRightToLeftAlignment], 0)
|
||||
else
|
||||
MoveSel(True, 0, 1);
|
||||
end;
|
||||
VK_UP:
|
||||
MoveSel(True, 0, -1);
|
||||
VK_DOWN:
|
||||
|
@ -1190,7 +1190,10 @@ begin
|
||||
end;
|
||||
Result:=inherited GetDefaultEditor(Column);
|
||||
//Need this to be able to intercept VK_Delete in the editor
|
||||
EditorOptions := EditorOptions or EO_HOOKKEYDOWN;
|
||||
if (KeyDelete in KeyOptions) then
|
||||
EditorOptions := EditorOptions or EO_HOOKKEYDOWN
|
||||
else
|
||||
EditorOptions := EditorOptions and (not EO_HOOKKEYDOWN);
|
||||
if Column=1 then
|
||||
begin
|
||||
ItemProp := nil;
|
||||
|
Loading…
Reference in New Issue
Block a user