Skip to content
Permalink
Browse files

avoiding double call of dataChanged

  • Loading branch information
signedav committed Dec 17, 2019
1 parent b89f1e0 commit 0755647c3877910c751f88c3f564328de20604c4
@@ -269,8 +269,6 @@ Reloads the data from the source by calling reloadProviderData() implemented
by providers with data caches to synchronize, changes in the data source, feature
counts and other specific actions.
Emits the `dataChanged` signal

.. seealso:: :py:func:`reloadProviderData`
%End

virtual QDateTime timestamp() const;
@@ -360,7 +360,6 @@ class CORE_EXPORT QgsDataProvider : public QObject
* by providers with data caches to synchronize, changes in the data source, feature
* counts and other specific actions.
* Emits the `dataChanged` signal
* \see reloadProviderData()
*/
virtual void reloadData();

@@ -234,6 +234,7 @@ QgsRectangle QgsOapifProvider::extent() const

void QgsOapifProvider::reloadProviderData()
{
mUpdateFeatureCountAtNextFeatureCountRequest = true;
mShared->invalidateCache();
}

@@ -301,13 +302,16 @@ bool QgsOapifProvider::setSubsetString( const QString &filter, bool updateFeatur
if ( !mShared->computeServerFilter( errorMsg ) )
QgsMessageLog::logMessage( errorMsg, tr( "OAPIF" ) );

reloadData();

if ( updateFeatureCount )
{
mUpdateFeatureCountAtNextFeatureCountRequest = true;
reloadData();
}
else
{
mShared->invalidateCache();
emit dataChanged();
}

emit dataChanged();

return true;
}
@@ -755,7 +755,9 @@ bool QgsWFSProvider::setSubsetString( const QString &theSQL, bool updateFeatureC
QString errorMsg;
if ( !mShared->computeFilter( errorMsg ) )
QgsMessageLog::logMessage( errorMsg, tr( "WFS" ) );
reloadData();


mShared->invalidateCache();
if ( updateFeatureCount )
featureCount();

0 comments on commit 0755647

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