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 Change-Id: Ief44acdd08e5e5f5491241362aacfcd2083f011d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit b587e7143d7f1eeb6686b52727fbb9d7db6a820c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
7d858ad28c
commit
a012e558d5
@ -7100,7 +7100,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