mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-22 00:06:57 -04:00
Fix signal loop when resizing columns on opening attribute table
This commit is contained in:
parent
3d8dd4913c
commit
4d40202121
@ -667,7 +667,7 @@ void QgsDualView::tableColumnResized( int column, int width )
|
|||||||
{
|
{
|
||||||
QgsAttributeTableConfig config = mConfig;
|
QgsAttributeTableConfig config = mConfig;
|
||||||
int sourceCol = config.mapVisibleColumnToIndex( column );
|
int sourceCol = config.mapVisibleColumnToIndex( column );
|
||||||
if ( sourceCol >= 0 )
|
if ( sourceCol >= 0 && config.columnWidth( sourceCol ) != width )
|
||||||
{
|
{
|
||||||
config.setColumnWidth( sourceCol, width );
|
config.setColumnWidth( sourceCol, width );
|
||||||
setAttributeTableConfig( config );
|
setAttributeTableConfig( config );
|
||||||
@ -840,9 +840,13 @@ void QgsDualView::previewExpressionChanged( const QString &expression )
|
|||||||
void QgsDualView::onSortColumnChanged()
|
void QgsDualView::onSortColumnChanged()
|
||||||
{
|
{
|
||||||
QgsAttributeTableConfig cfg = mLayer->attributeTableConfig();
|
QgsAttributeTableConfig cfg = mLayer->attributeTableConfig();
|
||||||
cfg.setSortExpression( mFilterModel->sortExpression() );
|
if ( cfg.sortExpression() != mFilterModel->sortExpression() ||
|
||||||
cfg.setSortOrder( mFilterModel->sortOrder() );
|
cfg.sortOrder() != mFilterModel->sortOrder() )
|
||||||
setAttributeTableConfig( cfg );
|
{
|
||||||
|
cfg.setSortExpression( mFilterModel->sortExpression() );
|
||||||
|
cfg.setSortOrder( mFilterModel->sortOrder() );
|
||||||
|
setAttributeTableConfig( cfg );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void QgsDualView::sortByPreviewExpression()
|
void QgsDualView::sortByPreviewExpression()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user