mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-23 00:02:38 -05:00
Fix invalid model warning when opening an attribute table which contains no columns
This commit is contained in:
parent
044e0d2512
commit
3144425caf
@ -373,7 +373,7 @@ void QgsFeatureListView::ensureEditSelection( bool inSelection )
|
||||
// could fall back to
|
||||
bool validEditSelectionAvailable = false;
|
||||
|
||||
if ( selectedIndexes.isEmpty() || mModel->mapFromMaster( selectedIndexes.first() ).row() == -1 )
|
||||
if ( selectedIndexes.isEmpty() || !selectedIndexes.first().isValid() || mModel->mapFromMaster( selectedIndexes.first() ).row() == -1 )
|
||||
{
|
||||
validEditSelectionAvailable = false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user