Skip to content

Commit

Permalink
Fix drag and drop for qgz files. List in browser
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed Dec 18, 2017
1 parent 25635f0 commit 0a6eb12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -5962,7 +5962,7 @@ void QgisApp::openFile( const QString &fileName )
{
// check to see if we are opening a project file
QFileInfo fi( fileName );
if ( fi.completeSuffix() == QLatin1String( "qgs" ) )
if ( fi.completeSuffix() == QLatin1String( "qgs" ) || fi.completeSuffix() == QLatin1String( "qgz" ) )
{
QgsDebugMsg( "Opening project " + fileName );
openProject( fileName );
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsdataitem.cpp
Expand Up @@ -795,7 +795,7 @@ QVector<QgsDataItem *> QgsDirectoryItem::createChildren()
QString path = dir.absoluteFilePath( name );
QFileInfo fileInfo( path );

if ( fileInfo.suffix() == QLatin1String( "qgs" ) )
if ( fileInfo.suffix() == QLatin1String( "qgs" ) || fileInfo.suffix() == QLatin1String( "qgz" ) )
{
QgsDataItem *item = new QgsProjectItem( this, fileInfo.baseName(), path );
children.append( item );
Expand Down

0 comments on commit 0a6eb12

Please sign in to comment.