@@ -481,8 +481,7 @@ void QgsDualView::tableColumnResized( int column, int width )
481
481
if ( sourceCol >= 0 )
482
482
{
483
483
config.setColumnWidth ( sourceCol, width );
484
- mLayerCache ->layer ()->setAttributeTableConfig ( config );
485
- mConfig = config;
484
+ setAttributeTableConfig ( config );
486
485
}
487
486
}
488
487
@@ -495,7 +494,6 @@ void QgsDualView::hideColumn()
495
494
if ( sourceCol >= 0 )
496
495
{
497
496
config.setColumnHidden ( sourceCol, true );
498
- mLayerCache ->layer ()->setAttributeTableConfig ( config );
499
497
setAttributeTableConfig ( config );
500
498
}
501
499
}
@@ -518,7 +516,6 @@ void QgsDualView::resizeColumn()
518
516
if ( ok )
519
517
{
520
518
config.setColumnWidth ( sourceCol, width );
521
- mLayerCache ->layer ()->setAttributeTableConfig ( config );
522
519
setAttributeTableConfig ( config );
523
520
}
524
521
}
@@ -635,7 +632,7 @@ void QgsDualView::onSortColumnChanged()
635
632
QgsAttributeTableConfig cfg = mLayerCache ->layer ()->attributeTableConfig ();
636
633
cfg.setSortExpression ( mFilterModel ->sortExpression () );
637
634
cfg.setSortOrder ( mFilterModel ->sortOrder () );
638
- mLayerCache -> layer ()-> setAttributeTableConfig ( cfg );
635
+ setAttributeTableConfig ( cfg );
639
636
}
640
637
641
638
void QgsDualView::sortByPreviewExpression ()
@@ -691,7 +688,7 @@ void QgsDualView::setSortExpression( const QString& sortExpression, Qt::SortOrde
691
688
692
689
mConfig .setSortExpression ( sortExpression );
693
690
mConfig .setSortOrder ( sortOrder );
694
- mLayerCache -> layer ()-> setAttributeTableConfig ( mConfig );
691
+ setAttributeTableConfig ( mConfig );
695
692
}
696
693
697
694
QString QgsDualView::sortExpression () const
0 commit comments