Skip to content

Commit

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

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
  • Loading branch information
rouault authored and nyalldawson committed May 26, 2020
1 parent f393b13 commit 0d6d626
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 0d6d626

Please sign in to comment.