From 14562ba5401dec5aa0b01a2195cd60ae2a92643b Mon Sep 17 00:00:00 2001 From: mrlukeparry Date: Tue, 17 Jul 2012 23:15:58 +0200 Subject: [PATCH] Sketcher: fix incorrect datum text flip for non xy-plane sketches --- src/Mod/Sketcher/Gui/SoDatumLabel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/Sketcher/Gui/SoDatumLabel.cpp b/src/Mod/Sketcher/Gui/SoDatumLabel.cpp index 36b8ed6a2f..7f3d1e260e 100644 --- a/src/Mod/Sketcher/Gui/SoDatumLabel.cpp +++ b/src/Mod/Sketcher/Gui/SoDatumLabel.cpp @@ -834,12 +834,12 @@ void SoDatumLabel::GLRender(SoGLRenderAction * action) const SbViewportRegion & vpr = SoViewportRegionElement::get(state); SoGetMatrixAction * getmatrixaction = new SoGetMatrixAction(vpr); - getmatrixaction->apply(this); + getmatrixaction->apply(action); SbMatrix transform = getmatrixaction->getMatrix(); transform.multVecMatrix(surfNorm, surfNorm); - bool flip = surfNorm.dot(z) > 0; + bool flip = surfNorm.dot(z) > FLT_EPSILON; glDisable(GL_DEPTH_TEST); glEnable(GL_TEXTURE_2D); // Enable Textures