Skip to content

Commit

Permalink
Fix QgisApp::askUserForOGRSublayers expecting 4 fields per sublayer, …
Browse files Browse the repository at this point in the history
…but since 51abef4 there can be up to 5
  • Loading branch information
manisandro committed Oct 4, 2017
1 parent abaeb9e commit ab82c63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/qgisapp.cpp
Expand Up @@ -4358,13 +4358,13 @@ void QgisApp::askUserForOGRSublayers( QgsVectorLayer *layer )

QStringList elements = sublayer.split( QStringLiteral( ":" ) );
// merge back parts of the name that may have been split
while ( elements.size() > 4 )
while ( elements.size() > 5 )
{
elements[1] += ":" + elements[2];
elements.removeAt( 2 );
}

if ( elements.count() == 4 )
if ( elements.count() >= 4 )
{
QgsSublayersDialog::LayerDefinition def;
def.layerId = elements[0].toInt();
Expand Down

0 comments on commit ab82c63

Please sign in to comment.