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 6d1fdc6 commit 4c0a02820f1592cbdfe2d97f88502cf8279d9e6c
Showing with 9 additions and 0 deletions.
  1. +4 −0 src/gui/attributetable/qgsfeaturelistview.cpp
  2. +5 −0 src/gui/attributetable/qgsfeaturelistview.h
@@ -162,7 +162,10 @@ void QgsFeatureListView::editSelectionChanged( const QItemSelection &deselected,
QItemSelection localSelected = mModel->mapSelectionFromMaster( selected );
viewport()->update( visualRegionForSelection( localDeselected ) | visualRegionForSelection( localSelected ) );
}
}

void QgsFeatureListView::updateEditSelectionDependencies()
{
QItemSelection currentSelection = mCurrentEditSelectionModel->selection();
if ( currentSelection.size() == 1 )
{
@@ -463,6 +466,7 @@ void QgsFeatureListView::ensureEditSelection( bool inSelection )
}
mUpdateEditSelectionTimer.start();
}
emit 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 4c0a028

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