Skip to content
Permalink
Browse files

wms provider: add trailing slash, if url path is empty otherwise and …

…clear tileset list, when a tileless wms server is connected
  • Loading branch information
jef-n committed May 9, 2013
1 parent 85c67be commit b6c7496f8c1007f4ca4dca8972cad994876b85f3
Showing with 10 additions and 1 deletion.
  1. +5 −0 src/gui/qgsnewhttpconnection.cpp
  2. +5 −1 src/providers/wms/qgswmssourceselect.cpp
@@ -154,6 +154,11 @@ void QgsNewHttpConnection::accept()
url.removeEncodedQueryItem( params["FORMAT"].first );
}

if( url.encodedPath().isEmpty() )
{
url.setEncodedPath( "/" );
}

settings.setValue( key + "/url", url.toString() );
if ( mBaseKey == "/Qgis/connections-wms/" || mBaseKey == "/Qgis/connections-wcs/" )
{
@@ -418,6 +418,10 @@ bool QgsWMSSourceSelect::populateLayerList( QgsWmsProvider *wmsProvider )
lstTilesets->setSortingEnabled( true );
lstTilesets->sortByColumn( 0, Qt::AscendingOrder );
}
else
{
lstTilesets->setRowCount( 0 );
}

// If we got some layers, let the user add them to the map
if ( lstLayers->topLevelItemCount() == 1 )
@@ -890,7 +894,7 @@ void QgsWMSSourceSelect::updateButtons()
// disable tilesets, when layer are selected or no tilesets available
lstLayers->setEnabled( true );
tabServers->setTabEnabled( tabServers->indexOf( tabLayerOrder ), mLayerOrderTreeWidget->topLevelItemCount() > 0 );
tabServers->setTabEnabled( tabServers->indexOf( tabTilesets ), mLayerOrderTreeWidget->topLevelItemCount() == 0 && lstTilesets->rowCount() );
tabServers->setTabEnabled( tabServers->indexOf( tabTilesets ), mLayerOrderTreeWidget->topLevelItemCount() == 0 && lstTilesets->rowCount() > 0 );
btnGrpImageEncoding->setEnabled( true );
}

0 comments on commit b6c7496

Please sign in to comment.
You can’t perform that action at this time.