Fix selections in tables that span over several cells
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Tue, 28 Jul 2015 11:00:48 +0000 (13:00 +0200)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Tue, 4 Aug 2015 11:34:57 +0000 (11:34 +0000)
commitd296ebfe6585010a38db0e3043ef5ceaa6a30883
tree079babe8fe7ea17443c33e3f117c15216be37034
parent3efe416da236828010a446f415583a9777e4712d
Fix selections in tables that span over several cells

In the code that converts text layouts to subtrees in the scene
graph specifically for TextEdit, there was a cutoff to treat
text tables as single nodes in the graph (for simplicity).
However, this breaks selections, since the ranges spanned by
each cell will be interpreted as overlapping, messing up the
selection merging logic. We need the same approach here as for
any other text frame where we check frame boundaries.

[ChangeLog][TextEdit] Fixed issues with selections that spanned
several cells in a table.

Change-Id: I789041d84b5d163e209488f8f2f1f83a6471389f
Task-number: QTBUG-46928
Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
src/quick/items/qquicktextedit.cpp
tests/manual/scenegraph_lancelot/data/text/textedit_table_selected.qml [new file with mode: 0644]