Actions
Bug #10976
closedWAbstractItemView#setHeaderAlignment does not update vertical alignment
Start date:
09/27/2022
Due date:
% Done:
100%
Estimated time:
Description
When setHeaderAlignment
is used the vertical alignment is not updated. This is due to a translation error from Wt to JWt:
if (alignment.test(AlignVerticalMask))
Is translated to:
if (alignment.contains(AlignmentFlag.AlignVerticalMask))
The latter is always false, since EnumSet<AlignmentFlag>
will only ever contain AlignmentFlag
s, not EnumSet<AlignmentFlag>
s.
We get the correct translation when the C++ code is changed to:
if (!(alignment & AlignVerticalMask).empty())
The original code incidentally works in C++, since the type of AlignVerticalMask
(WFlags<AlignmentFlag>
) gets implicitly converted to AlignmentFlag
. We may want to consider making this explicit, to avoid more errors like this.
Updated by Roel Standaert about 2 years ago
- Status changed from InProgress to Review
- Assignee changed from Roel Standaert to Korneel Dumon
Updated by Roel Standaert about 2 years ago
- Status changed from Review to Implemented @Emweb
Updated by Roel Standaert about 2 years ago
- Assignee changed from Korneel Dumon to Roel Standaert
Updated by Roel Standaert almost 2 years ago
- Status changed from Implemented @Emweb to Closed
- Target version changed from 4.9.0 to 4.8.2
Actions