Fix warning "Painter path exceeds +/-32767 pixels."

In this case OpenGL requires using a stencil buffer.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2018-05-21 12:14:30 +03:00
parent ffdf42cc7a
commit fc92fd4824

View File

@ -418,11 +418,16 @@ VMainGraphicsView::VMainGraphicsView(QWidget *parent)
QOpenGLWidget *viewport = new QOpenGLWidget();
QSurfaceFormat fmt;
fmt.setSamples(settings->GetGraphicalOutput() ? 10 : 0);
fmt.setStencilBufferSize(8);
viewport->setFormat(fmt);
setViewport(viewport);
#else
setViewport(new QGLWidget(QGLFormat(QGL::DoubleBuffer|QGL::SampleBuffers)));
QGLWidget *viewport = new QGLWidget();
QGLFormat fmt = QGLFormat(QGL::DoubleBuffer|QGL::SampleBuffers);
fmt.setStencilBufferSize(8);
viewport->setFormat(fmt);
setViewport(viewport);
#endif
}