Skip to content

Commit 75cbafd

Browse files
committed
add more tolerance to grab paths
1 parent c1cdd63 commit 75cbafd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/diagrampathitem.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,10 @@ bool DiagramPathItem::collidesWithPath(const QPainterPath &path, Qt::ItemSelecti
467467
QPainterPath testPath;
468468
testPath.moveTo(myPoints[i-1]);
469469
testPath.lineTo(myPoints[i]);
470-
result=testPath.intersects(path);
470+
QPainterPathStroker stroker(pen());
471+
stroker.setWidth(2*myHandlerWidth);
472+
QPainterPath strokePath=stroker.createStroke(testPath);
473+
result=strokePath.intersects(path);
471474
if(result) break;
472475
// check handlers if selected
473476
if(isSelected()){

0 commit comments

Comments
 (0)