Skip to content
Permalink
Browse files

on ensuring the selection, the dependend objects (like feature info a…

…nd count of features) in the gui need to be updated even if the selection is not affected. This fixes that on adding or removing features the counter on the GUI will be updated.
  • Loading branch information
signedav committed Mar 16, 2020
1 parent 00492ca commit d409c65de9c31266ae00a16d1004b4856dc1f5b4
Showing with 10 additions and 0 deletions.
  1. +5 −0 src/gui/attributetable/qgsfeaturelistview.cpp
  2. +5 −0 src/gui/attributetable/qgsfeaturelistview.h
@@ -162,7 +162,11 @@ void QgsFeatureListView::editSelectionChanged( const QItemSelection &deselected,
QItemSelection localSelected = mModel->mapSelectionFromMaster( selected );
viewport()->update( visualRegionForSelection( localDeselected ) | visualRegionForSelection( localSelected ) );
}
updateEditSelectionDependencies();
}

void QgsFeatureListView::updateEditSelectionDependencies()
{
QItemSelection currentSelection = mCurrentEditSelectionModel->selection();
if ( currentSelection.size() == 1 )
{
@@ -463,6 +467,7 @@ void QgsFeatureListView::ensureEditSelection( bool inSelection )
}
mUpdateEditSelectionTimer.start();
}
updateEditSelectionDependencies();
}

void QgsFeatureListView::setFeatureSelectionManager( QgsIFeatureSelectionManager *featureSelectionManager )
@@ -214,6 +214,11 @@ class GUI_EXPORT QgsFeatureListView : public QListView
private slots:
void editSelectionChanged( const QItemSelection &deselected, const QItemSelection &selected );

/**
* Emmits the signal for the feature and the selection information
*/
void updateEditSelectionDependencies();

/**
* Make sure, there is an edit selection. If there is none, choose the first item.
* If \a inSelection is set to TRUE, the edit selection is done in selected entries if

0 comments on commit d409c65

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