Skip to content

Commit

Permalink
[Backport release-3_40] WMS Ignore layer extent settings for default …
Browse files Browse the repository at this point in the history
…value (#59848)

* WMS Ignore layer extent settings for default value

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: Damiano Lombardi <damiano@opengis.ch>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 12, 2024
1 parent b183529 commit 948e753
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ information for an HTTP Server for WMS, etc.
#include "qgsnewhttpconnection.h"
%End
public:

enum ConnectionType /BaseType=IntEnum/
{
ConnectionWfs,
Expand Down
1 change: 1 addition & 0 deletions python/gui/auto_generated/qgsnewhttpconnection.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ information for an HTTP Server for WMS, etc.
#include "qgsnewhttpconnection.h"
%End
public:

enum ConnectionType
{
ConnectionWfs,
Expand Down
4 changes: 4 additions & 0 deletions src/gui/qgsnewhttpconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#include <QRegularExpressionValidator>
#include <QUrlQuery>

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 )
Expand Down Expand Up @@ -154,6 +156,8 @@ QgsNewHttpConnection::QgsNewHttpConnection( QWidget *parent, ConnectionTypes typ
}
}

cbxWmsIgnoreReportedLayerExtents->setChecked( settingsIgnoreReportedLayerExtentsDefault->value() );

if ( !( flags & FlagShowTestConnection ) )
{
mTestConnectionButton->hide();
Expand Down
8 changes: 8 additions & 0 deletions src/gui/qgsnewhttpconnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@
#include "ui_qgsnewhttpconnectionbase.h"
#include "qgsguiutils.h"
#include "qgis_gui.h"
#include "qgssettingstree.h"

class QgsAuthSettingsWidget;
class QgsSettingsEntryBool;

/**
* \ingroup gui
Expand All @@ -35,6 +37,12 @@ class GUI_EXPORT QgsNewHttpConnection : public QDialog, private Ui::QgsNewHttpCo
Q_OBJECT

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.
*/
Expand Down

0 comments on commit 948e753

Please sign in to comment.