Skip to content

Commit

Permalink
Make welcome page Open Directory action highlight project file
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Aug 3, 2018
1 parent a893f52 commit 22c4284
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/app/qgswelcomepage.cpp
Expand Up @@ -19,6 +19,9 @@
#include "qgsversioninfo.h"
#include "qgsapplication.h"
#include "qgssettings.h"
#include "qgsgui.h"
#include "qgsnative.h"
#include "qgsfileutils.h"

#include <QHBoxLayout>
#include <QVBoxLayout>
Expand Down Expand Up @@ -151,9 +154,7 @@ void QgsWelcomePage::showContextMenuForProjects( QPoint point )
QAction *openFolderAction = new QAction( tr( "Open Directory…" ), menu );
connect( openFolderAction, &QAction::triggered, this, [path]
{
QFileInfo fi( path );
QString folder = fi.path();
QDesktopServices::openUrl( QUrl::fromLocalFile( folder ) );
QgsGui::instance()->nativePlatformInterface()->openFileExplorerAndSelectFile( path );
} );
menu->addAction( openFolderAction );
}
Expand Down

0 comments on commit 22c4284

Please sign in to comment.