mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 10:59:29 +02:00
Merged revision(s) 51286 #6d831b44de, 51317 #9e65d8f0c1 from trunk:
LCL: grids: partially revert r49016 #2b2ffb7044 that prevents OnSelectEditor when entering cell by keyboard. Issue #29191 ........ grids: Do not reset Offset in keyboard Events. Issue #29420, patch by Michl ........ git-svn-id: branches/fixes_1_6@51328 -
This commit is contained in:
parent
915e906be0
commit
67fc6eb2c8
@ -6848,9 +6848,9 @@ var
|
||||
|
||||
procedure MoveSel(Rel: Boolean; aCol,aRow: Integer);
|
||||
begin
|
||||
// Always reset Offset in keyboard Events
|
||||
FGCache.TLColOff:=0;
|
||||
FGCache.TLRowOff:=0;
|
||||
// Do not reset Offset in keyboard Events - see issue #29420
|
||||
//FGCache.TLColOff:=0;
|
||||
//FGCache.TLRowOff:=0;
|
||||
SelectActive:=Sh;
|
||||
Include(FGridFlags, gfEditingDone);
|
||||
if MoveNextSelectable(Rel, aCol, aRow) then
|
||||
@ -7179,19 +7179,17 @@ begin
|
||||
FRow := DRow;
|
||||
|
||||
MoveSelection;
|
||||
SelectEditor;
|
||||
|
||||
if EditorAlwaysShown then begin
|
||||
SelectEditor;
|
||||
if (FEditor<>nil) and EditorAlwaysShown then begin
|
||||
// if editor visibility was changed on BeforeMoveSelection or MoveSelection
|
||||
// make sure editor will be updated.
|
||||
// TODO: cell coords of last time editor was visible
|
||||
// could help here too, if they are not the same as the
|
||||
// current cell, editor should be hidden first too.
|
||||
if FEditor<>nil then begin
|
||||
if FEditor.Visible then
|
||||
EditorHide;
|
||||
EditorShow(true);
|
||||
end;
|
||||
if FEditor.Visible then
|
||||
EditorHide;
|
||||
EditorShow(true);
|
||||
end;
|
||||
|
||||
{$IfDef dbgGrid}DebugLnExit('MoveExtend END FCol= ',IntToStr(FCol), ' FRow= ',IntToStr(FRow));{$Endif}
|
||||
|
Loading…
Reference in New Issue
Block a user