Skip to content
Permalink
Browse files

Refresh virtual fields editing button state based on field selection

Allows removing virtual fields defined on read-only PostgreSQL tables.
Closes #17593
  • Loading branch information
strk committed Dec 5, 2017
1 parent 3d021c4 commit f5cd856531bf82a72088a7b98aee5dde0f12378a
Showing with 9 additions and 0 deletions.
  1. +8 −0 src/app/qgssourcefieldsproperties.cpp
  2. +1 −0 src/app/qgssourcefieldsproperties.h
@@ -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()
@@ -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 );

};

0 comments on commit f5cd856

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