diff options
author | Wang Chuan <ouchuanm@outlook.com> | 2020-06-02 22:35:34 +0800 |
---|---|---|
committer | Wang Chuan <ouchuanm@outlook.com> | 2020-06-05 08:25:04 +0800 |
commit | bf8b45e33af960c03c7dccf56e90e76eda1f510e (patch) | |
tree | 2b7e624daea3443eb7240abb799180ce9f21d246 /src/quick/items/qquicktextnodeengine.cpp | |
parent | 69126c7bb1eed2afd06fd70d364c8e4e2ba4a21a (diff) |
QQuickTextNodeEngine: prevent renderring transparent selection color
It is not necessary to render selection color which is transparent.
Pick-to: 5.15
Fixes: QTBUG-83819
Change-Id: I45c086652e194192619aad025121e6064ab37a58
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick/items/qquicktextnodeengine.cpp')
-rw-r--r-- | src/quick/items/qquicktextnodeengine.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/items/qquicktextnodeengine.cpp b/src/quick/items/qquicktextnodeengine.cpp index ccdf2c9fa5..5acd3c9bf6 100644 --- a/src/quick/items/qquicktextnodeengine.cpp +++ b/src/quick/items/qquicktextnodeengine.cpp @@ -801,8 +801,8 @@ void QQuickTextNodeEngine::addToSceneGraph(QQuickTextNode *parentNode, // Then, prepend all selection rectangles to the tree for (int i = 0; i < m_selectionRects.size(); ++i) { const QRectF &rect = m_selectionRects.at(i); - - parentNode->addRectangleNode(rect, m_selectionColor); + if (m_selectionColor.alpha() != 0) + parentNode->addRectangleNode(rect, m_selectionColor); } // Add decorations for each node to the tree. |