mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 13:49:32 +02:00
ValEdit: fix crash in ValueListEditor.AdjustColumnWidths.
Patch by Cyrax. Issue #0024779. git-svn-id: trunk@42205 -
This commit is contained in:
parent
08b51de095
commit
24dd7801d7
@ -1076,13 +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: Integer;
|
||||
CW, AWidth: Integer;
|
||||
begin
|
||||
CW := ClientWidth;
|
||||
if (doKeyColFixed in DisplayOptions) then
|
||||
begin
|
||||
//AutoSizeColumn(0);
|
||||
ColWidths[1] := CW - ColWidths[0];
|
||||
If ColWidths[0] > CW Then
|
||||
ColWidths[0] := CW - 1;
|
||||
AWidth := CW - ColWidths[0];
|
||||
If AWidth > 0 Then
|
||||
ColWidths[1] := AWidth;
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user