mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
Merge pull request #1457 from rouault/fix_crash_attr_table_no_attr_col
Fix crash when opening entity form from layer without attribute
This commit is contained in:
commit
4ded76f75f
@ -144,10 +144,14 @@ void QgsFeatureListView::editSelectionChanged( QItemSelection deselected, QItemS
|
||||
QItemSelection currentSelection = mCurrentEditSelectionModel->selection();
|
||||
if ( currentSelection.size() == 1 )
|
||||
{
|
||||
QgsFeature feat;
|
||||
mModel->featureByIndex( mModel->mapFromMaster( currentSelection.indexes().first() ), feat );
|
||||
QModelIndexList indexList = currentSelection.indexes();
|
||||
if ( !indexList.isEmpty() )
|
||||
{
|
||||
QgsFeature feat;
|
||||
mModel->featureByIndex( mModel->mapFromMaster( indexList.first() ), feat );
|
||||
|
||||
emit currentEditSelectionChanged( feat );
|
||||
emit currentEditSelectionChanged( feat );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user