forked from qt-creator/qt-creator
Editor: fix selection path for empty selections
Especially targets the painting of empty snippet replacement placeholder like in the default "if" snippet. Change-Id: I42d9fb901c66cddf4eab9dd7275b42a8f4e81282 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -134,8 +134,10 @@ QPainterPath TextEditorOverlay::createSelectionPath(const QTextCursor &begin, co
|
||||
int x = line.cursorToX(pos);
|
||||
lineRect.setLeft(x - borderWidth);
|
||||
lineRect.setRight(x + borderWidth);
|
||||
lineRect.setBottom(lineRect.bottom() + borderWidth);
|
||||
QPainterPath path;
|
||||
path.addRect(lineRect);
|
||||
path.translate(offset);
|
||||
return path;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user