[FEATURE][needs-docs] Update vector layer selection from feature

selection dialog
This commit is contained in:
Julien Cabieces 2019-09-23 09:58:53 +02:00
parent 485db34e56
commit 3c24de55e1
2 changed files with 4 additions and 6 deletions

View File

@ -15,7 +15,7 @@
#include "qgsfeatureselectiondlg.h" #include "qgsfeatureselectiondlg.h"
#include "qgsgenericfeatureselectionmanager.h" #include "qgsvectorlayerselectionmanager.h"
#include "qgsdistancearea.h" #include "qgsdistancearea.h"
#include "qgsfeaturerequest.h" #include "qgsfeaturerequest.h"
#include "qgsattributeeditorcontext.h" #include "qgsattributeeditorcontext.h"
@ -29,7 +29,7 @@ QgsFeatureSelectionDlg::QgsFeatureSelectionDlg( QgsVectorLayer *vl, QgsAttribute
{ {
setupUi( this ); setupUi( this );
mFeatureSelection = new QgsGenericFeatureSelectionManager( mDualView ); mFeatureSelection = new QgsVectorLayerSelectionManager( vl, mDualView );
mDualView->setFeatureSelectionManager( mFeatureSelection ); mDualView->setFeatureSelectionManager( mFeatureSelection );
@ -72,5 +72,3 @@ void QgsFeatureSelectionDlg::showEvent( QShowEvent *event )
QDialog::showEvent( event ); QDialog::showEvent( event );
} }

View File

@ -16,7 +16,7 @@
#ifndef QGSFEATURESELECTIONDLG_H #ifndef QGSFEATURESELECTIONDLG_H
#define QGSFEATURESELECTIONDLG_H #define QGSFEATURESELECTIONDLG_H
class QgsGenericFeatureSelectionManager; class QgsVectorLayerSelectionManager;
#include "ui_qgsfeatureselectiondlg.h" #include "ui_qgsfeatureselectiondlg.h"
#include "qgis_sip.h" #include "qgis_sip.h"
@ -67,7 +67,7 @@ class GUI_EXPORT QgsFeatureSelectionDlg : public QDialog, private Ui::QgsFeature
void setSelectedFeatures( const QgsFeatureIds &ids ); void setSelectedFeatures( const QgsFeatureIds &ids );
private: private:
QgsGenericFeatureSelectionManager *mFeatureSelection = nullptr; QgsVectorLayerSelectionManager *mFeatureSelection = nullptr;
QgsVectorLayer *mVectorLayer = nullptr; QgsVectorLayer *mVectorLayer = nullptr;
// QWidget interface // QWidget interface