mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-03 00:02:25 -05:00
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
This commit is contained in:
parent
bb621677c8
commit
4aff6b74dc
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user