Skip to content

Commit 0a6eb12

Browse files
committedDec 18, 2017
Fix drag and drop for qgz files. List in browser
1 parent 25635f0 commit 0a6eb12

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5962,7 +5962,7 @@ void QgisApp::openFile( const QString &fileName )
59625962
{
59635963
// check to see if we are opening a project file
59645964
QFileInfo fi( fileName );
5965-
if ( fi.completeSuffix() == QLatin1String( "qgs" ) )
5965+
if ( fi.completeSuffix() == QLatin1String( "qgs" ) || fi.completeSuffix() == QLatin1String( "qgz" ) )
59665966
{
59675967
QgsDebugMsg( "Opening project " + fileName );
59685968
openProject( fileName );

‎src/core/qgsdataitem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ QVector<QgsDataItem *> QgsDirectoryItem::createChildren()
795795
QString path = dir.absoluteFilePath( name );
796796
QFileInfo fileInfo( path );
797797

798-
if ( fileInfo.suffix() == QLatin1String( "qgs" ) )
798+
if ( fileInfo.suffix() == QLatin1String( "qgs" ) || fileInfo.suffix() == QLatin1String( "qgz" ) )
799799
{
800800
QgsDataItem *item = new QgsProjectItem( this, fileInfo.baseName(), path );
801801
children.append( item );

0 commit comments

Comments
 (0)
Please sign in to comment.