diff options
-rw-r--r-- | src/quick/items/qquicktextnodeengine.cpp | 6 | ||||
-rw-r--r-- | tests/manual/scenegraph_lancelot/data/text/textedit_cyrillic_selected_all.qml | 13 |
2 files changed, 15 insertions, 4 deletions
diff --git a/src/quick/items/qquicktextnodeengine.cpp b/src/quick/items/qquicktextnodeengine.cpp index 7903f79e89..5140ccb68f 100644 --- a/src/quick/items/qquicktextnodeengine.cpp +++ b/src/quick/items/qquicktextnodeengine.cpp @@ -596,7 +596,6 @@ void QQuickTextNodeEngine::addGlyphsInRange(int rangeStart, int rangeLength, for (int j=0; j<glyphRuns.size(); ++j) { const QGlyphRun &glyphRun = glyphRuns.at(j); addSelectedGlyphs(glyphRun); - addUnselectedGlyphs(glyphRun); } } @@ -762,11 +761,10 @@ void QQuickTextNodeEngine::addToSceneGraph(QQuickTextNode *parentNode, parentNode->addRectangleNode(rect, color); } - // Add all unselected text first + // Add all text with unselected color first for (int i = 0; i < nodes.size(); ++i) { const BinaryTreeNode *node = nodes.at(i); - if (node->selectionState == Unselected) - parentNode->addGlyphs(node->position, node->glyphRun, node->color, style, styleColor, 0); + parentNode->addGlyphs(node->position, node->glyphRun, node->color, style, styleColor, 0); } for (int i = 0; i < imageNodes.size(); ++i) { diff --git a/tests/manual/scenegraph_lancelot/data/text/textedit_cyrillic_selected_all.qml b/tests/manual/scenegraph_lancelot/data/text/textedit_cyrillic_selected_all.qml new file mode 100644 index 0000000000..9580f28e29 --- /dev/null +++ b/tests/manual/scenegraph_lancelot/data/text/textedit_cyrillic_selected_all.qml @@ -0,0 +1,13 @@ +import QtQuick 2.0 + +Item { + width: 320 + height: 480 + TextEdit { + id: textEdit + text: "и в у" + anchors.centerIn: parent + Component.onCompleted: textEdit.selectAll() + font.pixelSize: 14 + } +} |