Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
What's new
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Menu
Open sidebar
FPC
Lazarus
Lazarus
Commits
ed3cfadc
Commit
ed3cfadc
authored
Sep 29, 2019
by
Bart B
🐞
Browse files
LCL: fix crash in TStringGrid.InsertRowWithValues is Columns.Enabled is True. Issue
#36067
git-svn-id: trunk@61946 -
parent
96eee65d
Changes
1
Hide whitespace changes
Inline
Side-by-side
lcl/grids.pas
View file @
ed3cfadc
...
...
@@ -11761,11 +11761,19 @@ end;
procedure
TCustomStringGrid
.
InsertRowWithValues
(
Index
:
Integer
;
Values
:
array
of
String
);
var
i
,
OldRC
:
Integer
;
i
,
OldRC
,
Diff
:
Integer
;
begin
OldRC
:=
RowCount
;
if
Length
(
Values
)
>
ColCount
then
ColCount
:=
Length
(
Values
);
Diff
:=
Length
(
Values
)
-
ColCount
;
if
Diff
>
0
then
begin
if
Columns
.
Enabled
then
begin
for
i
:=
1
to
Diff
do
with
Columns
.
Add
do
Title
.
Caption
:=
''
;
end
else
ColCount
:=
Length
(
Values
);
end
;
InsertColRow
(
false
,
Index
);
//if RowCount was 0, then setting ColCount restores RowCount (from FGridPropBackup)
//which is unwanted here, so reset it (Issue #0026943)
...
...
FPC Admin account
@fpc_admin
mentioned in issue
#36067 (closed)
·
Jul 29, 2021
mentioned in issue
#36067 (closed)
mentioned in issue #36067
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment