Qt5: workaround for undocking of mdi view

fix minor issues reported by clang static analyzer
This commit is contained in:
wmayer
2017-05-03 22:01:46 +02:00
parent 810ec334d0
commit ffa10bbf0c
6 changed files with 83 additions and 10 deletions

View File

@@ -870,7 +870,7 @@ void GLImageBox::renderText(int x, int y, const QString& str, const QFont& fnt)
GLint view[4];
bool use_scissor_testing = f->glIsEnabled(GL_SCISSOR_TEST);
if (!use_scissor_testing)
//if (!use_scissor_testing)
f->glGetIntegerv(GL_VIEWPORT, &view[0]);

View File

@@ -337,11 +337,11 @@ void SoDatumLabel::generatePrimitives(SoAction * action)
} else if (this->datumtype.getValue() == SYMMETRIC) {
// Get the Scale. See GLRender function for details on the viewport width calculation
SoState *state = action->getState();
const SbViewVolume & vv = SoViewVolumeElement::get(state);
float scale = vv.getWorldToScreenScale(SbVec3f(0.f,0.f,0.f), 1.0f);
SbVec2s vp_size = SoViewportRegionElement::get(state).getViewportSizePixels();
scale /= float(vp_size[0]);
//SoState *state = action->getState();
//const SbViewVolume & vv = SoViewVolumeElement::get(state);
//float scale = vv.getWorldToScreenScale(SbVec3f(0.f,0.f,0.f), 1.0f);
//SbVec2s vp_size = SoViewportRegionElement::get(state).getViewportSizePixels();
//scale /= float(vp_size[0]);
SbVec3f dir = (p2-p1);
dir.normalize();