in the function of mouseMoveEvent(QMouseEvent* event),RPolylineEntity cann't be selected by the following code:
RMouseEvent e(*event, *scene, *this, getDevicePixelRatio());
RDocumentInterface *di = getDocumentInterface();
REntity::Id entityId = di->getClosestEntity(e);
entityId is null, but other entity can be selected, e.g. RLineEntity, REllipseEntity, RSplineEntity...
why?
when i debug it step by step, the return value of the following funciton is null:
QSet<REntity::Id> RDocument::queryInfiniteEntities() {
return storage.queryInfiniteEntities();
}
RPolylineEntity cann't be selected? why?
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
-
- Active Member
- Posts: 33
- Joined: Thu Jan 14, 2016 4:17 am
Re: RPolylineEntity cann't be selected? why?
getClosestEntity should work for all entities.
queryInfiniteEntities only returns IDs for infinite entities (XLines, Rays).
Perhaps you can attach the drawing with the polyline in question.
queryInfiniteEntities only returns IDs for infinite entities (XLines, Rays).
Perhaps you can attach the drawing with the polyline in question.