@@ -481,8 +481,7 @@ void QgsDualView::tableColumnResized( int column, int width )
481481 if ( sourceCol >= 0 )
482482 {
483483 config.setColumnWidth ( sourceCol, width );
484- mLayerCache ->layer ()->setAttributeTableConfig ( config );
485- mConfig = config;
484+ setAttributeTableConfig ( config );
486485 }
487486}
488487
@@ -495,7 +494,6 @@ void QgsDualView::hideColumn()
495494 if ( sourceCol >= 0 )
496495 {
497496 config.setColumnHidden ( sourceCol, true );
498- mLayerCache ->layer ()->setAttributeTableConfig ( config );
499497 setAttributeTableConfig ( config );
500498 }
501499}
@@ -518,7 +516,6 @@ void QgsDualView::resizeColumn()
518516 if ( ok )
519517 {
520518 config.setColumnWidth ( sourceCol, width );
521- mLayerCache ->layer ()->setAttributeTableConfig ( config );
522519 setAttributeTableConfig ( config );
523520 }
524521 }
@@ -635,7 +632,7 @@ void QgsDualView::onSortColumnChanged()
635632 QgsAttributeTableConfig cfg = mLayerCache ->layer ()->attributeTableConfig ();
636633 cfg.setSortExpression ( mFilterModel ->sortExpression () );
637634 cfg.setSortOrder ( mFilterModel ->sortOrder () );
638- mLayerCache -> layer ()-> setAttributeTableConfig ( cfg );
635+ setAttributeTableConfig ( cfg );
639636}
640637
641638void QgsDualView::sortByPreviewExpression ()
@@ -691,7 +688,7 @@ void QgsDualView::setSortExpression( const QString& sortExpression, Qt::SortOrde
691688
692689 mConfig .setSortExpression ( sortExpression );
693690 mConfig .setSortOrder ( sortOrder );
694- mLayerCache -> layer ()-> setAttributeTableConfig ( mConfig );
691+ setAttributeTableConfig ( mConfig );
695692}
696693
697694QString QgsDualView::sortExpression () const
0 commit comments