Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
backport PR 8987: allow drop 2dm files from system browser, allow non…
…-ascii filenames for mesh
  • Loading branch information
PeterPetrik committed Jan 30, 2019
1 parent 5f38b34 commit 95e45a3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -6329,6 +6329,12 @@ bool QgisApp::openLayer( const QString &fileName, bool allowInteractive )

CPLPopErrorHandler();

// Try to load as mesh layer after raster & vector
if ( !ok )
{
ok = addMeshLayer( fileName, fileInfo.completeBaseName(), "mdal" );
}

if ( !ok )
{
// we have no idea what this file is...
Expand Down
2 changes: 1 addition & 1 deletion src/providers/mdal/qgsmdalprovider.cpp
Expand Up @@ -50,7 +50,7 @@ QgsCoordinateReferenceSystem QgsMdalProvider::crs() const
QgsMdalProvider::QgsMdalProvider( const QString &uri, const ProviderOptions &options )
: QgsMeshDataProvider( uri, options )
{
QByteArray curi = uri.toAscii();
QByteArray curi = uri.toUtf8();
mMeshH = MDAL_LoadMesh( curi.constData() );
if ( mMeshH )
{
Expand Down
1 change: 1 addition & 0 deletions tests/src/providers/CMakeLists.txt
Expand Up @@ -9,6 +9,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/auth
${CMAKE_SOURCE_DIR}/src/core/expression
${CMAKE_SOURCE_DIR}/src/core/geometry
${CMAKE_SOURCE_DIR}/src/core/mesh
${CMAKE_SOURCE_DIR}/src/core/metadata
${CMAKE_SOURCE_DIR}/src/core/raster
${CMAKE_SOURCE_DIR}/src/core/symbology
Expand Down

0 comments on commit 95e45a3

Please sign in to comment.