mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
Fix crash on "Open Directory" entry of contextual menu of recent projects
Fixes #31630 I couldn't reproduce a crash on my platform (Linux, Ubuntu 16.04, gnome classic), but this smells pretty much like the issue of #30210 fixed per PR #30210 So using QgsFocusKeeper hoping that it would solve the issue for people affected
This commit is contained in:
parent
f393b13da7
commit
0d6d626ec1
@ -18,6 +18,7 @@
|
||||
#include "qgisapp.h"
|
||||
#include "qgsversioninfo.h"
|
||||
#include "qgsapplication.h"
|
||||
#include "qgsfocuskeeper.h"
|
||||
#include "qgssettings.h"
|
||||
#include "qgsgui.h"
|
||||
#include "qgsnative.h"
|
||||
@ -291,6 +292,7 @@ void QgsWelcomePage::showContextMenuForProjects( QPoint point )
|
||||
QAction *openFolderAction = new QAction( tr( "Open Directory…" ), menu );
|
||||
connect( openFolderAction, &QAction::triggered, this, [path]
|
||||
{
|
||||
QgsFocusKeeper focusKeeper;
|
||||
QgsGui::instance()->nativePlatformInterface()->openFileExplorerAndSelectFile( path );
|
||||
} );
|
||||
menu->addAction( openFolderAction );
|
||||
|
Loading…
x
Reference in New Issue
Block a user