QPainter: Fix regression in drawText with empty rect and DontClip flag
A recent bugfix introduced a shortcut in text layouting, skipping all layout when the cliprect parameter is empty, since all will be clipped away anyway. However, the case when the DontClip flag is set was overlooked. This commit rectifies that. This commit modifies c7df8dda8b60b4e4e7b1859f462d65cef5d8c85b Fixes: QTBUG-129914 Pick-to: 6.8 Change-Id: Ief44acdd08e5e5f5491241362aacfcd2083f011d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This commit is contained in:
parent
d44b3ad1c8
commit
b587e7143d
@ -7102,7 +7102,7 @@ void qt_format_text(const QFont &fnt, const QRectF &_r,
|
||||
|
||||
Q_ASSERT( !((tf & ~Qt::TextDontPrint)!=0 && option!=nullptr) ); // we either have an option or flags
|
||||
|
||||
if (_r.isEmpty()) {
|
||||
if (_r.isEmpty() && !(tf & Qt::TextDontClip)) {
|
||||
if (!brect)
|
||||
return;
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user