Skip to content
Permalink
Browse files

Safer workflow when checking for OpenCL

This is to prevent users being locked out of the
settings when a buggy OpenCL driver that was
working before starts failing.

Related to #36078
  • Loading branch information
elpaso authored and nyalldawson committed Apr 29, 2020
1 parent bb62167 commit 4aff6b74dc4de672b72ee8d668ed9c9b7e523565
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/app/qgsoptions.cpp
@@ -1153,8 +1153,13 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
{
if ( checked )
{
// Since this may crash and lock users out of the settings, let's disable opencl setting before entering
// and restore after available was successfully called
const bool openClStatus { QgsOpenClUtils::enabled() };
QgsOpenClUtils::setEnabled( false );
if ( QgsOpenClUtils::available( ) )
{
QgsOpenClUtils::setEnabled( openClStatus );
mOpenClContainerWidget->setEnabled( true );
mOpenClDevicesCombo->clear();

0 comments on commit 4aff6b7

Please sign in to comment.
You can’t perform that action at this time.