mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 16:19:28 +02:00
fixed changing the cell value while in editor mode from Jesus
git-svn-id: trunk@6652 -
This commit is contained in:
parent
623d8f33d0
commit
07c70ad0b5
@ -3756,7 +3756,7 @@ begin
|
|||||||
{$IfDef dbgFocus}DebugLn('DoEnter - EditorHiding');{$Endif}
|
{$IfDef dbgFocus}DebugLn('DoEnter - EditorHiding');{$Endif}
|
||||||
end else begin
|
end else begin
|
||||||
{$IfDef dbgFocus}DebugLn('DoEnter - Ext');{$Endif}
|
{$IfDef dbgFocus}DebugLn('DoEnter - Ext');{$Endif}
|
||||||
exit;
|
//exit;
|
||||||
if EditorAlwaysShown then begin
|
if EditorAlwaysShown then begin
|
||||||
SelectEditor;
|
SelectEditor;
|
||||||
if Feditor=nil then Invalidate
|
if Feditor=nil then Invalidate
|
||||||
@ -5630,6 +5630,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomStringGrid.Setcells(aCol, aRow: Integer; const Avalue: string);
|
procedure TCustomStringGrid.Setcells(aCol, aRow: Integer; const Avalue: string);
|
||||||
|
procedure UpdateCell;
|
||||||
|
begin
|
||||||
|
if EditorMode and (aCol=FCol)and(aRow=FRow) then
|
||||||
|
begin
|
||||||
|
EditorDoSetValue;
|
||||||
|
end;
|
||||||
|
InvalidateCell(aCol, aRow);
|
||||||
|
end;
|
||||||
var
|
var
|
||||||
C: PCellProps;
|
C: PCellProps;
|
||||||
begin
|
begin
|
||||||
@ -5637,7 +5645,7 @@ begin
|
|||||||
if C<>nil then begin
|
if C<>nil then begin
|
||||||
if C^.Text<>nil then StrDispose(C^.Text);
|
if C^.Text<>nil then StrDispose(C^.Text);
|
||||||
C^.Text:=StrNew(pchar(aValue));
|
C^.Text:=StrNew(pchar(aValue));
|
||||||
InvalidateCell(aCol, aRow);
|
UpdateCell;
|
||||||
end else begin
|
end else begin
|
||||||
if AValue<>'' then begin
|
if AValue<>'' then begin
|
||||||
New(C);
|
New(C);
|
||||||
@ -5645,7 +5653,7 @@ begin
|
|||||||
C^.Attr:=nil;
|
C^.Attr:=nil;
|
||||||
C^.Data:=nil;
|
C^.Data:=nil;
|
||||||
FGrid.Celda[aCol,aRow]:=C;
|
FGrid.Celda[aCol,aRow]:=C;
|
||||||
InvalidateCell(aCol, aRow);
|
UpdateCell;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user