Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh virtual fields editing button state based on field selection #5809

Merged
merged 1 commit into from
Dec 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/app/qgssourcefieldsproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down Expand Up @@ -388,6 +392,10 @@ void QgsSourceFieldsProperties::attributesListCellChanged( int row, int column )
}
}

void QgsSourceFieldsProperties::attributesListCellPressed( int /*row*/, int /*column*/ )
{
updateButtons();
}

//NICE FUNCTIONS
void QgsSourceFieldsProperties::updateButtons()
Expand Down
1 change: 1 addition & 0 deletions src/app/qgssourcefieldsproperties.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

};

Expand Down