Skip to content
Permalink
Browse files

[Project-OWS-Tab] Doen't add null CRS to list

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 f0fc170ebf0e9c850ca0cccbde835c8835871e73
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/app/qgsprojectproperties.cpp
@@ -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();

0 comments on commit f0fc170

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