Fixed AA setting not being applied to the first view.

This commit is contained in:
Leonardo Zide 2017-03-26 23:12:05 -07:00
parent 49a88e1ab4
commit 6491d15bb3
2 changed files with 9 additions and 9 deletions

View file

@ -104,6 +104,15 @@ void lcMainWindow::CreateWidgets()
CreateMenus();
CreateStatusBar();
int AASamples = lcGetProfileInt(LC_PROFILE_ANTIALIASING_SAMPLES);
if (AASamples > 1)
{
QGLFormat format;
format.setSampleBuffers(true);
format.setSamples(AASamples);
QGLFormat::setDefaultFormat(format);
}
mModelTabWidget = new QTabWidget();
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
mModelTabWidget->tabBar()->setMovable(true);

View file

@ -99,15 +99,6 @@ lcQGLWidget::lcQGLWidget(QWidget *parent, lcGLWidget *owner, bool view)
gPlaceholderMesh = new lcMesh;
gPlaceholderMesh->CreateBox();
int AASamples = lcGetProfileInt(LC_PROFILE_ANTIALIASING_SAMPLES);
if (AASamples > 1)
{
QGLFormat format;
format.setSampleBuffers(true);
format.setSamples(AASamples);
QGLFormat::setDefaultFormat(format);
}
}
gWidgetList.append(this);