mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-01 21:09:35 +02:00
Qt: fixed index out of bounds when setting item text. issue #27740
git-svn-id: trunk@48509 -
This commit is contained in:
parent
31adc59c71
commit
3162d8bfd0
@ -1547,7 +1547,9 @@ begin
|
|||||||
AAlignment := AlignmentToQtAlignmentMap[ALV.Column[ASubIndex].Alignment] or QtAlignVCenter;
|
AAlignment := AlignmentToQtAlignmentMap[ALV.Column[ASubIndex].Alignment] or QtAlignVCenter;
|
||||||
QtTreeWidget.setItemText(TWI, ASubIndex, Str, AAlignment);
|
QtTreeWidget.setItemText(TWI, ASubIndex, Str, AAlignment);
|
||||||
{issue #27696 for autosized columns we must provide sizehint}
|
{issue #27696 for autosized columns we must provide sizehint}
|
||||||
if ALV.Column[ASubIndex].AutoSize then
|
if (TCustomListViewHack(ALV).Columns.Count > 0) and (ASubIndex >= 0) and
|
||||||
|
(ASubIndex < TCustomListViewHack(ALV).Columns.Count) and
|
||||||
|
ALV.Column[ASubIndex].AutoSize then
|
||||||
begin
|
begin
|
||||||
if Assigned(TCustomListViewHack(ALV).SmallImages) then
|
if Assigned(TCustomListViewHack(ALV).SmallImages) then
|
||||||
AIconWidth := TCustomListViewHack(ALV).SmallImages.Width
|
AIconWidth := TCustomListViewHack(ALV).SmallImages.Width
|
||||||
|
Loading…
Reference in New Issue
Block a user