summaryrefslogtreecommitdiff
path: root/src/plugins/platforms/windows/qwindowsdrag.cpp
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>2016-02-03 13:53:44 +0100
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2016-02-19 10:47:57 +0000
commit342c909b340cb1bfbb95480fc79dcea21a470c83 (patch)
tree32c0176c5e12d7045c6e3ef2ef0d7cf27a8f5907 /src/plugins/platforms/windows/qwindowsdrag.cpp
parentfef629cd9191bb73f22c5efb6f943e6b672953c1 (diff)
downloadqtbase-342c909b340cb1bfbb95480fc79dcea21a470c83.tar.gz
Qt Quick: Fix selection when mixing line breaks and line wraps
The enabler for finding selection ranges in Qt Quick had two bugs which caused some selected text to disappear. Specifically, this was the case for selected text where a line contained both an explicit break and a break due to line wrapping. First of all, the glyphsEnd that is passed into glyphRunsWithInfo() is expected to be inclusive, since we are actually searching for its index in the log cluster array. We would in certain cases not find the glyph at all in the log clusters, thus the glyph run would be set to overlap with any glyph run coming after it in the same item. Second of all, we need to start searching at the correct position in the log clusters when searching for the correct rangeStart, since rangeStart is initialized with textPosition. Otherwise, we would in some cases never reach the start of the range, and rangeStart would be set to textPosition + textLength, which is the end of the range. Task-number: QTBUG-49596 Change-Id: I436ba3f1c7414d4f5044d9b70aa04c60b01755e4 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsdrag.cpp')
0 files changed, 0 insertions, 0 deletions