mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-17 02:00:47 +01:00
LCL, grids: fix Grid-save-to-csv issues related to VisibleColumnsOnly, from wp, issue #30057
git-svn-id: trunk@52253 -
This commit is contained in:
parent
2f6d4c8b70
commit
2d2e8cfaa7
@ -11038,11 +11038,13 @@ begin
|
|||||||
// Collect header column names to a temporary StringList
|
// Collect header column names to a temporary StringList
|
||||||
for i := 0 to ColCount-1 do begin
|
for i := 0 to ColCount-1 do begin
|
||||||
c := ColumnFromGridColumn(i);
|
c := ColumnFromGridColumn(i);
|
||||||
if c=nil then
|
if (c <> nil) then begin
|
||||||
HeaderL.Add(Cells[i, 0])
|
|
||||||
else
|
|
||||||
if c.Visible or not VisibleColumnsOnly then
|
if c.Visible or not VisibleColumnsOnly then
|
||||||
HeaderL.Add(c.Title.Caption);
|
HeaderL.Add(c.Title.Caption);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if not VisibleColumnsOnly then
|
||||||
|
HeaderL.Add(Cells[i, 0]);
|
||||||
end;
|
end;
|
||||||
HeaderL.Delimiter:=ADelimiter;
|
HeaderL.Delimiter:=ADelimiter;
|
||||||
Headerl.StrictDelimiter := False; //force quoting of strings that contain whitespace or Delimiter
|
Headerl.StrictDelimiter := False; //force quoting of strings that contain whitespace or Delimiter
|
||||||
@ -11063,8 +11065,6 @@ begin
|
|||||||
if Columns.Enabled and VisibleColumnsOnly then begin
|
if Columns.Enabled and VisibleColumnsOnly then begin
|
||||||
HeaderL := TStringList.Create;
|
HeaderL := TStringList.Create;
|
||||||
try
|
try
|
||||||
for j := 1 to FixedCols do
|
|
||||||
HeaderL.Add('');
|
|
||||||
for j := 0 to ColCount-1 do begin
|
for j := 0 to ColCount-1 do begin
|
||||||
c := ColumnFromGridColumn(j);
|
c := ColumnFromGridColumn(j);
|
||||||
if c=nil then Continue;
|
if c=nil then Continue;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user