Commit 3162d8bf authored by Željan Rikalo's avatar Željan Rikalo 🏊🏼
Browse files

Qt: fixed index out of bounds when setting item text. issue #27740

git-svn-id: trunk@48509 -
parent 31adc59c
......@@ -1547,7 +1547,9 @@ begin
AAlignment := AlignmentToQtAlignmentMap[ALV.Column[ASubIndex].Alignment] or QtAlignVCenter;
QtTreeWidget.setItemText(TWI, ASubIndex, Str, AAlignment);
{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
if Assigned(TCustomListViewHack(ALV).SmallImages) then
AIconWidth := TCustomListViewHack(ALV).SmallImages.Width
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment