mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-26 09:41:02 +02:00
cody: find overloads: keep selection on refresh
git-svn-id: trunk@50056 -
This commit is contained in:
parent
38c4e5243b
commit
4981bd5136
@ -823,12 +823,14 @@ procedure TCodyFindOverloadsWindow.FillGrid;
|
|||||||
var
|
var
|
||||||
Grid: TStringGrid;
|
Grid: TStringGrid;
|
||||||
Row: Integer;
|
Row: Integer;
|
||||||
s: String;
|
s, OldSelectedProcName: String;
|
||||||
aProc: TCFOProc;
|
aProc: TCFOProc;
|
||||||
begin
|
begin
|
||||||
Grid:=ResultsStringGrid;
|
Grid:=ResultsStringGrid;
|
||||||
Grid.BeginUpdate;
|
Grid.BeginUpdate;
|
||||||
Grid.Visible:=true;
|
OldSelectedProcName:='';
|
||||||
|
if Grid.Row>0 then
|
||||||
|
OldSelectedProcName:=Grid.Cells[0,Grid.Row];
|
||||||
Grid.Columns[0].Title.Caption:=crsName;
|
Grid.Columns[0].Title.Caption:=crsName;
|
||||||
Grid.Columns[1].Title.Caption:=crsCompatibility;
|
Grid.Columns[1].Title.Caption:=crsCompatibility;
|
||||||
Grid.Columns[2].Title.Caption:=crsDistance;
|
Grid.Columns[2].Title.Caption:=crsDistance;
|
||||||
@ -844,6 +846,8 @@ begin
|
|||||||
s+=aProc.Name;
|
s+=aProc.Name;
|
||||||
aProc.Caption:=s;
|
aProc.Caption:=s;
|
||||||
Grid.Cells[0,Row]:=s;
|
Grid.Cells[0,Row]:=s;
|
||||||
|
if s=OldSelectedProcName then
|
||||||
|
Grid.Row:=Row;
|
||||||
|
|
||||||
case aProc.Compatibility of
|
case aProc.Compatibility of
|
||||||
tcExact: s:=crsExact;
|
tcExact: s:=crsExact;
|
||||||
@ -856,6 +860,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
Grid.SortColRow(true,0);
|
Grid.SortColRow(true,0);
|
||||||
|
Grid.Visible:=true;
|
||||||
Grid.EndUpdate(true);
|
Grid.EndUpdate(true);
|
||||||
|
|
||||||
Grid.HandleNeeded;
|
Grid.HandleNeeded;
|
||||||
|
Loading…
Reference in New Issue
Block a user