Skip to content

Commit

Permalink
Fix #45671, fix wrong name in layertree for mesh layer.
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailsunni authored and github-actions[bot] committed Jan 31, 2022
1 parent 596153a commit 9477965
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/mesh/qgsnewmeshlayerdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ bool QgsNewMeshLayerDialog::apply()
{
layerName = fileName;
QFileInfo fileInfo( fileName );
layerName = fileInfo.baseName();
layerName = fileInfo.completeBaseName();
}
std::unique_ptr<QgsMeshLayer> newMeshLayer = std::make_unique<QgsMeshLayer>( fileName, layerName, QStringLiteral( "mdal" ) );

Expand Down
2 changes: 1 addition & 1 deletion src/providers/mdal/qgsmdalsourceselect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ void QgsMdalSourceSelect::addButtonClicked()

for ( const QString &path : QgsFileWidget::splitFilePaths( mMeshPath ) )
{
emit addMeshLayer( path, QFileInfo( path ).baseName(), QStringLiteral( "mdal" ) );
emit addMeshLayer( path, QFileInfo( path ).completeBaseName(), QStringLiteral( "mdal" ) );
}
}

0 comments on commit 9477965

Please sign in to comment.