Skip to content

Commit

Permalink
[Project-OWS-Tab] Doen't add null CRS to list
Browse files Browse the repository at this point in the history
It was possible to add null CRS in the OWS Tab CRS list. To avoid it, I
add a test on return 0 as CRS Id and to set a default CRS with the last
in the OWS Tab CRS list.
  • Loading branch information
rldhont committed Jan 5, 2014
1 parent 712ef84 commit f0fc170
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/qgsprojectproperties.cpp
Expand Up @@ -996,7 +996,10 @@ void QgsProjectProperties::on_pbnWMSAddSRS_clicked()
{
QgsGenericProjectionSelector *mySelector = new QgsGenericProjectionSelector( this );
mySelector->setMessage();
if ( mySelector->exec() )
if ( mWMSList->count() > 0 ) {
mySelector->setSelectedAuthId( mWMSList->item( mWMSList->count()-1 )->text() );
}
if ( mySelector->exec() && mySelector->selectedCrsId()!=0 )
{
QString authid = mySelector->selectedAuthId();

Expand Down

0 comments on commit f0fc170

Please sign in to comment.