@@ -51,35 +51,39 @@ QgsNewHttpConnection::QgsNewHttpConnection(
5151 txtName->setText ( connName );
5252 txtUrl->setText ( settings.value ( key + " /url" ).toString () );
5353
54- if ( mBaseKey == " /Qgis/connections-wms/" )
54+ cbxIgnoreGetMapURI->setChecked ( settings.value ( key + " /ignoreGetMapURI" , false ).toBool () );
55+ cbxIgnoreAxisOrientation->setChecked ( settings.value ( key + " /ignoreAxisOrientation" , false ).toBool () );
56+ cbxInvertAxisOrientation->setChecked ( settings.value ( key + " /invertAxisOrientation" , false ).toBool () );
57+ cbxIgnoreGetFeatureInfoURI->setChecked ( settings.value ( key + " /ignoreGetFeatureInfoURI" , false ).toBool () );
58+
59+ txtUserName->setText ( settings.value ( credentialsKey + " /username" ).toString () );
60+ txtPassword->setText ( settings.value ( credentialsKey + " /password" ).toString () );
61+ }
62+
63+ if ( mBaseKey != " /Qgis/connections-wms/" )
64+ {
65+ if ( mBaseKey == " /Qgis/connections-wcs/" )
5566 {
56- cbxIgnoreGetMapURI->setChecked ( settings.value ( key + " /ignoreGetMapURI" , false ).toBool () );
57- cbxIgnoreGetFeatureInfoURI->setChecked ( settings.value ( key + " /ignoreGetFeatureInfoURI" , false ).toBool () );
58- cbxIgnoreAxisOrientation->setChecked ( settings.value ( key + " /ignoreAxisOrientation" , false ).toBool () );
59- cbxInvertAxisOrientation->setChecked ( settings.value ( key + " /invertAxisOrientation" , false ).toBool () );
67+ cbxIgnoreGetMapURI->setText ( tr ( " Ignore GetCoverage URI reported in capabilities" ) );
68+ cbxIgnoreAxisOrientation->setText ( tr ( " Ignore axis orientation" ) );
6069 }
6170 else
6271 {
6372 cbxIgnoreGetMapURI->setVisible ( false );
64- cbxIgnoreGetFeatureInfoURI->setVisible ( false );
6573 cbxIgnoreAxisOrientation->setVisible ( false );
6674 cbxInvertAxisOrientation->setVisible ( false );
75+ mGroupBox ->layout ()->removeWidget ( cbxIgnoreGetMapURI );
76+ mGroupBox ->layout ()->removeWidget ( cbxIgnoreAxisOrientation );
77+ mGroupBox ->layout ()->removeWidget ( cbxInvertAxisOrientation );
6778 }
6879
69- txtUserName->setText ( settings.value ( credentialsKey + " /username" ).toString () );
70- txtPassword->setText ( settings.value ( credentialsKey + " /password" ).toString () );
71- }
72- if ( mBaseKey != " /Qgis/connections-wms/" )
73- {
74- cbxIgnoreGetMapURI->setVisible ( false );
7580 cbxIgnoreGetFeatureInfoURI->setVisible ( false );
76- mGroupBox ->layout ()->removeWidget ( cbxIgnoreGetMapURI );
7781 mGroupBox ->layout ()->removeWidget ( cbxIgnoreGetFeatureInfoURI );
82+
7883 // Adjust height
7984 int w = width ();
8085 adjustSize ();
8186 resize ( w, height () );
82-
8387 }
8488
8589 on_txtName_textChanged ( connName );
@@ -134,13 +138,16 @@ void QgsNewHttpConnection::accept()
134138 }
135139
136140 settings.setValue ( key + " /url" , url.toString () );
137- if ( mBaseKey == " /Qgis/connections-wms/" )
141+ if ( mBaseKey == " /Qgis/connections-wms/" || mBaseKey == " /Qgis/connections-wcs/ " )
138142 {
139143 settings.setValue ( key + " /ignoreGetMapURI" , cbxIgnoreGetMapURI->isChecked () );
140- settings.setValue ( key + " /ignoreGetFeatureInfoURI" , cbxIgnoreGetFeatureInfoURI->isChecked () );
141144 settings.setValue ( key + " /ignoreAxisOrientation" , cbxIgnoreAxisOrientation->isChecked () );
142145 settings.setValue ( key + " /invertAxisOrientation" , cbxInvertAxisOrientation->isChecked () );
143146 }
147+ if ( mBaseKey == " /Qgis/connections-wms/" )
148+ {
149+ settings.setValue ( key + " /ignoreGetFeatureInfoURI" , cbxIgnoreGetFeatureInfoURI->isChecked () );
150+ }
144151
145152 settings.setValue ( credentialsKey + " /username" , txtUserName->text () );
146153 settings.setValue ( credentialsKey + " /password" , txtPassword->text () );
0 commit comments