Merge pull request #21982 from tetektoza/feature/11603_render_constraints_below_geom

Sketcher: Prioritize rendering geometry lines rendering over constraints
This commit is contained in:
Kacper Donat
2025-06-19 00:03:50 +02:00
committed by GitHub
2 changed files with 2 additions and 7 deletions

View File

@@ -75,7 +75,7 @@ struct DrawingParameters
const float zMidLines = 0.006f; // Height used for in-the-middle rendered lines
const float zHighLines = 0.007f; // Height used for on top rendered lines
const float zHighLine = 0.008f; // Height for highlighted lines (selected/preselected)
const float zConstr = 0.009f; // Height for rendering constraints
const float zConstr = 0.004f; // Height for rendering constraints
const float zRootPoint = 0.010f; // Height used for rendering the root point
const float zLowPoints = 0.011f; // Height used for bottom rendered points
const float zMidPoints = 0.012f; // Height used for mid rendered points

View File

@@ -121,7 +121,6 @@ void EditModeConstraintCoinManager::processConstraints(const GeoListFacade& geol
auto zConstrH = ViewProviderSketchCoinAttorney::getViewOrientationFactor(viewProvider)
* drawingParameters.zConstr;
// After an undo/redo it can happen that we have an empty geometry list but a non-empty
// constraint list In this case just ignore the constraints. (See bug #0000421)
if (geolistfacade.geomlist.size() <= 2 && !constrlist.empty()) {
@@ -1976,12 +1975,8 @@ void EditModeConstraintCoinManager::rebuildConstraintNodes(
text->size.setValue(drawingParameters.labelFontSize);
text->lineWidth = 2 * drawingParameters.pixelScalingFactor;
text->useAntialiasing = false;
SoAnnotation* anno = new SoAnnotation();
anno->renderCaching = SoSeparator::OFF;
anno->addChild(text);
// #define CONSTRAINT_SEPARATOR_INDEX_MATERIAL_OR_DATUMLABEL 0
sep->addChild(text);
editModeScenegraphNodes.constrGroup->addChild(anno);
editModeScenegraphNodes.constrGroup->addChild(sep);
vConstrType.push_back((*it)->Type);
// nodes not needed
sep->unref();