mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-14 10:08:33 +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,
|
// If key column is fixed in width then adjust only the second column,
|
||||||
// otherwise adjust both columns propertionally.
|
// otherwise adjust both columns propertionally.
|
||||||
var
|
var
|
||||||
CW, AWidth: Integer;
|
CW, AWidth, BWidth: Integer;
|
||||||
begin
|
begin
|
||||||
CW := ClientWidth;
|
CW := ClientWidth;
|
||||||
if (doKeyColFixed in DisplayOptions) then
|
if (doKeyColFixed in DisplayOptions) then
|
||||||
begin
|
begin
|
||||||
//AutoSizeColumn(0);
|
//AutoSizeColumn(0);
|
||||||
If ColWidths[0] > CW Then
|
If ColWidths[0] > CW Then Begin
|
||||||
ColWidths[0] := CW - 1;
|
BWidth := CW - 1;
|
||||||
|
If BWidth > 0 Then
|
||||||
|
ColWidths[0] := BWidth;
|
||||||
|
end;
|
||||||
AWidth := CW - ColWidths[0];
|
AWidth := CW - ColWidths[0];
|
||||||
If AWidth > 0 Then
|
If AWidth > 0 Then
|
||||||
ColWidths[1] := AWidth;
|
ColWidths[1] := AWidth;
|
||||||
|
Loading…
Reference in New Issue
Block a user