From 3ebc2cca6bc134a4cacc5fb0d32de92984e9790c Mon Sep 17 00:00:00 2001 From: Jeremy Hu Date: Thu, 2 Jan 2020 08:03:33 +0930 Subject: [PATCH] Show wireframe by default Toggle wireframe would cause crash on linux/MesaGL, only show wireframes on Windows and MacOS by default. --- src/documentwindow.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/documentwindow.cpp b/src/documentwindow.cpp index 8fffa529..4713ff42 100644 --- a/src/documentwindow.cpp +++ b/src/documentwindow.cpp @@ -305,8 +305,11 @@ DocumentWindow::DocumentWindow() : m_modelRenderWidget->setMinimumSize(DocumentWindow::m_modelRenderWidgetInitialSize, DocumentWindow::m_modelRenderWidgetInitialSize); m_modelRenderWidget->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); m_modelRenderWidget->move(DocumentWindow::m_modelRenderWidgetInitialX, DocumentWindow::m_modelRenderWidgetInitialY); - m_modelRenderWidget->setMousePickRadius(m_document->mousePickRadius()); +#ifndef __linux__ + // FIXME: Toggle wireframe crash on linux/MesaGL + m_modelRenderWidget->toggleWireframe(); +#endif connect(m_modelRenderWidget, &ModelWidget::mouseRayChanged, m_document, [=](const QVector3D &nearPosition, const QVector3D &farPosition) {