aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktextnodeengine_p.h
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>2015-03-20 14:21:46 +0100
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>2015-03-24 11:37:03 +0000
commit7a874de4db87bfb3fd40e47bb488850a8a4047d4 (patch)
tree2b2280b576ee44cde89c1d54bfb050a9c9e19d2f /src/quick/items/qquicktextnodeengine_p.h
parenta501ea6401430d79737a18d807446d223777bb8e (diff)
Fix disappearing text in selections
Change 11a595e30615943cd6c63f08cc44cde7861112eb introduced a regression where selected text might disappear randomly because we changed the order the nodes were added to the list. The order is significant in cases where there is overlap, such as for painting selections. Instead of iterating over the hash and thus getting the regular nodes in random order, we make the first node with any given key the primary node, add this to the list immediately, and then just do a look up in the hash for the nodes that should be merged with it. Change-Id: Id2208ab672294aa3dd2bc9741e6c6697c2c66746 Task-number: QTBUG-45133 Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
Diffstat (limited to 'src/quick/items/qquicktextnodeengine_p.h')
-rw-r--r--src/quick/items/qquicktextnodeengine_p.h11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/quick/items/qquicktextnodeengine_p.h b/src/quick/items/qquicktextnodeengine_p.h
index 178454b19e..2f6cacf601 100644
--- a/src/quick/items/qquicktextnodeengine_p.h
+++ b/src/quick/items/qquicktextnodeengine_p.h
@@ -104,16 +104,7 @@ public:
struct BinaryTreeNodeKey
{
- BinaryTreeNodeKey(QFontEngine *fe,
- QQuickDefaultClipNode *cn,
- QRgb col,
- int selState)
- : fontEngine(fe)
- , clipNode(cn)
- , color(col)
- , selectionState(selState)
- {
- }
+ BinaryTreeNodeKey(BinaryTreeNode *node);
bool operator==(const BinaryTreeNodeKey &otherKey) const
{