Skip to content
Permalink
Browse files

[afs] Remove 'cached' checkbox from source select dialog

This checkbox was never hooked up to anything (caching is ALWAYS
enabled for the provider).

(cherry picked from commit 1066161)
  • Loading branch information
nyalldawson committed Nov 7, 2018
1 parent 2ac6013 commit 76c31dbc5e40f71ada3a8d9dc1fc9e3b0875dddd
@@ -110,14 +110,11 @@ bool QgsAfsSourceSelect::connectToService( const QgsOwsConnection &connection )
QStandardItem *nameItem = new QStandardItem( name );
QStandardItem *abstractItem = new QStandardItem( description );
abstractItem->setToolTip( description );
QStandardItem *cachedItem = new QStandardItem();
QStandardItem *filterItem = new QStandardItem();
cachedItem->setCheckable( true );
cachedItem->setCheckState( Qt::Checked );

mAvailableCRS[name] = QList<QString>() << authid;

layerItems.insert( layerId, QList<QStandardItem *>() << idItem << nameItem << abstractItem << cachedItem << filterItem );
layerItems.insert( layerId, QList<QStandardItem *>() << idItem << nameItem << abstractItem << filterItem );
}
}, serviceInfoMap, baseItemUrl );

@@ -158,7 +155,7 @@ void QgsAfsSourceSelect::buildQuery( const QgsOwsConnection &connection, const Q
{
return;
}
QModelIndex filterIndex = index.sibling( index.row(), 4 );
QModelIndex filterIndex = index.sibling( index.row(), 3 );
const QString url = index.sibling( index.row(), 0 ).data( UrlRole ).toString();

// Query available fields
@@ -78,8 +78,7 @@ QgsArcGisServiceSourceSelect::QgsArcGisServiceSourceSelect( const QString &servi
mModel->setHorizontalHeaderItem( 2, new QStandardItem( QStringLiteral( "Abstract" ) ) );
if ( serviceType == FeatureService )
{
mModel->setHorizontalHeaderItem( 3, new QStandardItem( QStringLiteral( "Cache Feature" ) ) );
mModel->setHorizontalHeaderItem( 4, new QStandardItem( QStringLiteral( "Filter" ) ) );
mModel->setHorizontalHeaderItem( 3, new QStandardItem( QStringLiteral( "Filter" ) ) );
gbImageEncoding->hide();
}
else
@@ -346,14 +345,13 @@ void QgsArcGisServiceSourceSelect::addButtonClicked()
QString layerTitle = mModel->itemFromIndex( mModel->index( row, 0, idx.parent() ) )->text(); //layer title/id
QString layerName = mModel->itemFromIndex( mModel->index( row, 1, idx.parent() ) )->text(); //layer name
const QString layerUri = mModel->itemFromIndex( mModel->index( row, 0, idx.parent() ) )->data( UrlRole ).toString();
bool cacheFeatures = mServiceType == FeatureService ? mModel->itemFromIndex( mModel->index( row, 3, idx.parent() ) )->checkState() == Qt::Checked : false;
QString filter = mServiceType == FeatureService ? mModel->itemFromIndex( mModel->index( row, 4, idx.parent() ) )->text() : QString(); //optional filter specified by user
QString filter = mServiceType == FeatureService ? mModel->itemFromIndex( mModel->index( row, 3, idx.parent() ) )->text() : QString(); //optional filter specified by user
if ( cbxUseTitleLayerName->isChecked() && !layerTitle.isEmpty() )
{
layerName = layerTitle;
}
QgsRectangle layerExtent;
if ( mServiceType == FeatureService && ( cbxFeatureCurrentViewExtent->isChecked() || !cacheFeatures ) )
if ( mServiceType == FeatureService && ( cbxFeatureCurrentViewExtent->isChecked() ) )
{
layerExtent = extent;
}

0 comments on commit 76c31db

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