Skip to content

Commit

Permalink
Fix crash on "Open Directory" entry of contextual menu of recent proj…
Browse files Browse the repository at this point in the history
…ects

Fixes qgis#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 qgis#30210 fixed per PR qgis#30210

So using QgsFocusKeeper hoping that it would solve the issue for people affected
  • Loading branch information
rouault committed May 26, 2020
1 parent bcea438 commit 678c62d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/qgswelcomepage.cpp
Expand Up @@ -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"
Expand Down Expand Up @@ -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 );
Expand Down

0 comments on commit 678c62d

Please sign in to comment.