diff --git a/src/core/qgsdataitem.cpp b/src/core/qgsdataitem.cpp index e217fd270e2..c3d9c93d292 100644 --- a/src/core/qgsdataitem.cpp +++ b/src/core/qgsdataitem.cpp @@ -1329,6 +1329,8 @@ QVector QgsZipItem::createChildren() if ( item ) { QgsDebugMsgLevel( "loaded item", 3 ); + // the item comes with zipped file name, set the name to relative path within zip file + item->setName( fileName ); children.append( item ); break; } diff --git a/src/core/qgsdataitem.h b/src/core/qgsdataitem.h index 62d5399b01f..077b3b299f5 100644 --- a/src/core/qgsdataitem.h +++ b/src/core/qgsdataitem.h @@ -144,6 +144,7 @@ class CORE_EXPORT QgsDataItem : public QObject QVector children() const { return mChildren; } virtual QIcon icon(); QString name() const { return mName; } + void setName( const QString &name ) { mName = name; } QString path() const { return mPath; } void setPath( const QString &path ) { mPath = path; } //! Create path component replacing path separators