@@ -524,8 +524,7 @@ void QgsDualView::tableColumnResized( int column, int width )
524
524
if ( sourceCol >= 0 )
525
525
{
526
526
config.setColumnWidth ( sourceCol, width );
527
- mLayerCache ->layer ()->setAttributeTableConfig ( config );
528
- mConfig = config;
527
+ setAttributeTableConfig ( config );
529
528
}
530
529
}
531
530
@@ -538,7 +537,6 @@ void QgsDualView::hideColumn()
538
537
if ( sourceCol >= 0 )
539
538
{
540
539
config.setColumnHidden ( sourceCol, true );
541
- mLayerCache ->layer ()->setAttributeTableConfig ( config );
542
540
setAttributeTableConfig ( config );
543
541
}
544
542
}
@@ -561,7 +559,6 @@ void QgsDualView::resizeColumn()
561
559
if ( ok )
562
560
{
563
561
config.setColumnWidth ( sourceCol, width );
564
- mLayerCache ->layer ()->setAttributeTableConfig ( config );
565
562
setAttributeTableConfig ( config );
566
563
}
567
564
}
@@ -661,7 +658,7 @@ void QgsDualView::onSortColumnChanged()
661
658
QgsAttributeTableConfig cfg = mLayerCache ->layer ()->attributeTableConfig ();
662
659
cfg.setSortExpression ( mFilterModel ->sortExpression () );
663
660
cfg.setSortOrder ( mFilterModel ->sortOrder () );
664
- mLayerCache -> layer ()-> setAttributeTableConfig ( cfg );
661
+ setAttributeTableConfig ( cfg );
665
662
}
666
663
667
664
void QgsDualView::sortByPreviewExpression ()
@@ -717,7 +714,7 @@ void QgsDualView::setSortExpression( const QString& sortExpression, Qt::SortOrde
717
714
718
715
mConfig .setSortExpression ( sortExpression );
719
716
mConfig .setSortOrder ( sortOrder );
720
- mLayerCache -> layer ()-> setAttributeTableConfig ( mConfig );
717
+ setAttributeTableConfig ( mConfig );
721
718
}
722
719
723
720
QString QgsDualView::sortExpression () const
0 commit comments