diff --git a/src/app/qgssourcefieldsproperties.cpp b/src/app/qgssourcefieldsproperties.cpp index 5f2e3173ab7..8602c97c0ea 100644 --- a/src/app/qgssourcefieldsproperties.cpp +++ b/src/app/qgssourcefieldsproperties.cpp @@ -88,6 +88,10 @@ void QgsSourceFieldsProperties::loadRows() mFieldsList->resizeColumnsToContents(); connect( mFieldsList, &QTableWidget::cellChanged, this, &QgsSourceFieldsProperties::attributesListCellChanged ); + + connect( mFieldsList, &QTableWidget::cellPressed, this, &QgsSourceFieldsProperties::attributesListCellPressed ); + + updateButtons(); updateFieldRenamingStatus(); } @@ -388,6 +392,10 @@ void QgsSourceFieldsProperties::attributesListCellChanged( int row, int column ) } } +void QgsSourceFieldsProperties::attributesListCellPressed( int /*row*/, int /*column*/ ) +{ + updateButtons(); +} //NICE FUNCTIONS void QgsSourceFieldsProperties::updateButtons() diff --git a/src/app/qgssourcefieldsproperties.h b/src/app/qgssourcefieldsproperties.h index 1c2a256b43d..33867deb9f0 100644 --- a/src/app/qgssourcefieldsproperties.h +++ b/src/app/qgssourcefieldsproperties.h @@ -105,6 +105,7 @@ class APP_EXPORT QgsSourceFieldsProperties : public QWidget, private Ui_QgsSourc void attributeDeleted( int idx ); void attributesListCellChanged( int row, int column ); + void attributesListCellPressed( int row, int column ); };