mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-28 00:04:04 -04:00
Refresh virtual fields editing button state based on field selection
Allows removing virtual fields defined on read-only PostgreSQL tables. Closes #17593
This commit is contained in:
parent
3d021c44d5
commit
f5cd856531
@ -88,6 +88,10 @@ void QgsSourceFieldsProperties::loadRows()
|
|||||||
|
|
||||||
mFieldsList->resizeColumnsToContents();
|
mFieldsList->resizeColumnsToContents();
|
||||||
connect( mFieldsList, &QTableWidget::cellChanged, this, &QgsSourceFieldsProperties::attributesListCellChanged );
|
connect( mFieldsList, &QTableWidget::cellChanged, this, &QgsSourceFieldsProperties::attributesListCellChanged );
|
||||||
|
|
||||||
|
connect( mFieldsList, &QTableWidget::cellPressed, this, &QgsSourceFieldsProperties::attributesListCellPressed );
|
||||||
|
|
||||||
|
updateButtons();
|
||||||
updateFieldRenamingStatus();
|
updateFieldRenamingStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -388,6 +392,10 @@ void QgsSourceFieldsProperties::attributesListCellChanged( int row, int column )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QgsSourceFieldsProperties::attributesListCellPressed( int /*row*/, int /*column*/ )
|
||||||
|
{
|
||||||
|
updateButtons();
|
||||||
|
}
|
||||||
|
|
||||||
//NICE FUNCTIONS
|
//NICE FUNCTIONS
|
||||||
void QgsSourceFieldsProperties::updateButtons()
|
void QgsSourceFieldsProperties::updateButtons()
|
||||||
|
@ -105,6 +105,7 @@ class APP_EXPORT QgsSourceFieldsProperties : public QWidget, private Ui_QgsSourc
|
|||||||
void attributeDeleted( int idx );
|
void attributeDeleted( int idx );
|
||||||
|
|
||||||
void attributesListCellChanged( int row, int column );
|
void attributesListCellChanged( int row, int column );
|
||||||
|
void attributesListCellPressed( int row, int column );
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user