mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 12:18:03 +02:00
LCL: Prevent crash in TValueListEditor when resizing a parent form. Issue #24827, patch from Cyrax
git-svn-id: trunk@42319 -
This commit is contained in:
parent
8b13c332d2
commit
f40d0f314f
@ -1076,14 +1076,17 @@ procedure TValueListEditor.AdjustColumnWidths;
|
||||
// If key column is fixed in width then adjust only the second column,
|
||||
// otherwise adjust both columns propertionally.
|
||||
var
|
||||
CW, AWidth: Integer;
|
||||
CW, AWidth, BWidth: Integer;
|
||||
begin
|
||||
CW := ClientWidth;
|
||||
if (doKeyColFixed in DisplayOptions) then
|
||||
begin
|
||||
//AutoSizeColumn(0);
|
||||
If ColWidths[0] > CW Then
|
||||
ColWidths[0] := CW - 1;
|
||||
If ColWidths[0] > CW Then Begin
|
||||
BWidth := CW - 1;
|
||||
If BWidth > 0 Then
|
||||
ColWidths[0] := BWidth;
|
||||
end;
|
||||
AWidth := CW - ColWidths[0];
|
||||
If AWidth > 0 Then
|
||||
ColWidths[1] := AWidth;
|
||||
|
Loading…
Reference in New Issue
Block a user