mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-15 00:07:25 -05:00
[locator] add a way to invalidate results from python API
otherwise if you access the config of the filter (or change app settings) from outside the main application settings dialog, results are not invalidate for instance, if you update a URL of a service, results won't be updated
This commit is contained in:
parent
6192b5eb36
commit
a15d8903ed
@ -1102,6 +1102,15 @@ deregisterLocatorFilter() to deregister their filters upon plugin unload to avoi
|
||||
.. seealso:: :py:func:`registerLocatorFilter`
|
||||
|
||||
.. versionadded:: 3.0
|
||||
%End
|
||||
|
||||
virtual void invalidateLocatorResults() = 0;
|
||||
%Docstring
|
||||
Invalidate results from the locator filter.
|
||||
|
||||
This might be useful if the configuration of the filter changed without going through main application settings.
|
||||
|
||||
.. versionadded:: 3.2
|
||||
%End
|
||||
|
||||
virtual bool askForDatumTransform( QgsCoordinateReferenceSystem sourceCrs, QgsCoordinateReferenceSystem destinationCrs ) = 0;
|
||||
|
||||
@ -774,6 +774,11 @@ void QgisAppInterface::deregisterLocatorFilter( QgsLocatorFilter *filter )
|
||||
qgis->mLocatorWidget->locator()->deregisterFilter( filter );
|
||||
}
|
||||
|
||||
void QgisAppInterface::invalidateLocatorResults()
|
||||
{
|
||||
qgis->mLocatorWidget->invalidateResults();
|
||||
}
|
||||
|
||||
bool QgisAppInterface::askForDatumTransform( QgsCoordinateReferenceSystem sourceCrs, QgsCoordinateReferenceSystem destinationCrs )
|
||||
{
|
||||
return qgis->askUserForDatumTransform( sourceCrs, destinationCrs );
|
||||
|
||||
@ -544,6 +544,7 @@ class APP_EXPORT QgisAppInterface : public QgisInterface
|
||||
|
||||
void registerLocatorFilter( QgsLocatorFilter *filter ) override;
|
||||
void deregisterLocatorFilter( QgsLocatorFilter *filter ) override;
|
||||
void invalidateLocatorResults() override;
|
||||
|
||||
bool askForDatumTransform( QgsCoordinateReferenceSystem sourceCrs, QgsCoordinateReferenceSystem destinationCrs ) override;
|
||||
|
||||
|
||||
@ -902,6 +902,15 @@ class GUI_EXPORT QgisInterface : public QObject
|
||||
*/
|
||||
virtual void deregisterLocatorFilter( QgsLocatorFilter *filter ) = 0;
|
||||
|
||||
/**
|
||||
* Invalidate results from the locator filter.
|
||||
*
|
||||
* This might be useful if the configuration of the filter changed without going through main application settings.
|
||||
*
|
||||
* \since QGIS 3.2
|
||||
*/
|
||||
virtual void invalidateLocatorResults() = 0;
|
||||
|
||||
/**
|
||||
* Checks available datum transforms and ask user if several are available and none
|
||||
* is chosen. Dialog is shown only if global option is set accordingly.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user