diff --git a/src/gui/qgsnewhttpconnection.cpp b/src/gui/qgsnewhttpconnection.cpp index 01552a3d97f85..55ac3773bf938 100644 --- a/src/gui/qgsnewhttpconnection.cpp +++ b/src/gui/qgsnewhttpconnection.cpp @@ -32,6 +32,8 @@ #include #include +const QgsSettingsEntryBool *QgsNewHttpConnection::settingsIgnoreReportedLayerExtentsDefault = new QgsSettingsEntryBool( QStringLiteral( "ignore-reported-layer-extents-default" ), sTreeHttpConnectionDialog, false ) ; + QgsNewHttpConnection::QgsNewHttpConnection( QWidget *parent, ConnectionTypes types, const QString &serviceName, const QString &connectionName, QgsNewHttpConnection::Flags flags, Qt::WindowFlags fl ) : QDialog( parent, fl ) , mTypes( types ) @@ -158,6 +160,8 @@ QgsNewHttpConnection::QgsNewHttpConnection( QWidget *parent, ConnectionTypes typ } } + cbxWmsIgnoreReportedLayerExtents->setChecked( settingsIgnoreReportedLayerExtentsDefault->value() ); + if ( !( flags & FlagShowTestConnection ) ) { mTestConnectionButton->hide(); diff --git a/src/gui/qgsnewhttpconnection.h b/src/gui/qgsnewhttpconnection.h index d80a857bc117c..4bba9e529e75f 100644 --- a/src/gui/qgsnewhttpconnection.h +++ b/src/gui/qgsnewhttpconnection.h @@ -22,8 +22,10 @@ #include "ui_qgsnewhttpconnectionbase.h" #include "qgsguiutils.h" #include "qgis_gui.h" +#include "qgssettingstree.h" class QgsAuthSettingsWidget; +class QgsSettingsEntryBool; /** * \ingroup gui @@ -36,6 +38,12 @@ class GUI_EXPORT QgsNewHttpConnection : public QDialog, private Ui::QgsNewHttpCo public: +#ifndef SIP_RUN + static inline QgsSettingsTreeNode *sTreeHttpConnectionDialog = QgsSettingsTree::sTreeConnections->createChildNode( QStringLiteral( "http-connection-dialog" ) ); + + static const QgsSettingsEntryBool *settingsIgnoreReportedLayerExtentsDefault; +#endif + /** * Available connection types for configuring in the dialog. */