Skip to content
Permalink
Browse files

Make welcome page Open Directory action highlight project file

  • Loading branch information
nyalldawson committed Aug 3, 2018
1 parent a893f52 commit 22c4284354ad4eec7857a1c13acd24c599c9774f
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/app/qgswelcomepage.cpp
@@ -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>
@@ -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 );
}

0 comments on commit 22c4284

Please sign in to comment.
You can’t perform that action at this time.