Commit e2ad4c28 authored by Alessandro Portale's avatar Alessandro Portale

TextEditor: Simplify the overlay selection path

The algorithm that creates the overlay selection path adds many
redundant curve elements. That is quite ineffecient when painting and it
also creates visual gaps.

This patch simplifies the path and therefore substantially reduces the
elements and removes the gaps.

Task-number: QTCREATORBUG-18518
Change-Id: If3558e226825426ca6b143eeba4239e6f0061df0
Reviewed-by: David Schulz's avatarDavid Schulz <david.schulz@qt.io>
parent 345ea030
......@@ -307,7 +307,7 @@ QPainterPath TextEditorOverlay::createSelectionPath(const QTextCursor &begin, co
}
path.closeSubpath();
path.translate(offset);
return path;
return path.simplified();
}
void TextEditorOverlay::paintSelection(QPainter *painter,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment