Skip to content

Commit

Permalink
[skip ci] line width must be explicitly set in NaviCube and SoFCSelec…
Browse files Browse the repository at this point in the history
…tionRoot to avoid that an inappropriate value is used when set from somewhere else
  • Loading branch information
wwmayer committed Nov 10, 2019
1 parent fd9054b commit 17831b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/Gui/NaviCube.cpp
Expand Up @@ -854,6 +854,7 @@ void NaviCubeImplementation::drawNaviCube(bool pickMode) {
glClearDepth(1.0f);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
glLineWidth(2.0);

glDisable(GL_LIGHTING);
//glDisable(GL_BLEND);
Expand Down
7 changes: 4 additions & 3 deletions src/Gui/SoFCUnifiedSelection.cpp
Expand Up @@ -32,7 +32,6 @@
#include <Inventor/elements/SoOverrideElement.h>
#include <Inventor/elements/SoLazyElement.h>
#include <Inventor/elements/SoCacheElement.h>
#include <Inventor/elements/SoOverrideElement.h>
#include <Inventor/elements/SoWindowElement.h>

#include <Inventor/SoFullPath.h>
Expand All @@ -45,6 +44,7 @@
#include <Inventor/elements/SoElements.h>
#include <Inventor/elements/SoFontNameElement.h>
#include <Inventor/elements/SoFontSizeElement.h>
#include <Inventor/elements/SoLineWidthElement.h>
#include <Inventor/elements/SoMaterialBindingElement.h>
#include <Inventor/elements/SoModelMatrixElement.h>
#include <Inventor/elements/SoShapeStyleElement.h>
Expand Down Expand Up @@ -1231,8 +1231,9 @@ bool SoFCSelectionRoot::renderBBox(SoGLRenderAction *action, SoNode *node, SbCol

SoMaterialBindingElement::set(state,SoMaterialBindingElement::OVERALL);
SoLazyElement::setEmissive(state, &color);
SoLazyElement::setDiffuse(state, node,1, &color,data->packer);
SoDrawStyleElement::set(state,node,SoDrawStyleElement::LINES);
SoLazyElement::setDiffuse(state, node,1, &color, data->packer);
SoDrawStyleElement::set(state, node, SoDrawStyleElement::LINES);
SoLineWidthElement::set(state, node, 1.0f);

const static float trans = 0.0;
SoLazyElement::setTransparency(state, node, 1, &trans, data->packer);
Expand Down

0 comments on commit 17831b7

Please sign in to comment.