In ViewProviderSketcher::mousemove, I could easily add a 'ignore constrain' bool, as follow :
Code: Select all
if (Mode == STATUS_SKETCH_UseHandler) {
//don't preselect constraints if a sketcher tool is being used. It seems there isn't any usecase to select constrain while a sketcher tool is active.
//If there is then we need to add a parameter to not ignore.
preselectChanged = detectAndShowPreselection(Point.get(), cursorPos, true /*ignore constraints*/);
}
else {
preselectChanged = detectAndShowPreselection(Point.get(), cursorPos);
}
I went dipper in
Code: Select all
editCoinManager->detectPreselection
So it seems this doesn't trigger :
Code: Select all
// checking for a hit in the curves
if (tail == editModeScenegraphNodes.CurveSet[l]) {
const SoDetail *curve_detail = Point->getDetail(editModeScenegraphNodes.CurveSet[l]);
if (curve_detail && curve_detail->getTypeId() == SoLineDetail::getClassTypeId()) {
// get the index
int curveIndex = static_cast<const SoLineDetail *>(curve_detail)->getLineIndex();
result.GeoIndex = coinMapping.getCurveGeoId(curveIndex, l);
return result;
}
}
edit: sorry my title is bad. It should be 'Making constrain clear to selection when sketchHandler is active'