File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -667,7 +667,7 @@ void QgsDualView::tableColumnResized( int column, int width )
667
667
{
668
668
QgsAttributeTableConfig config = mConfig ;
669
669
int sourceCol = config.mapVisibleColumnToIndex ( column );
670
- if ( sourceCol >= 0 )
670
+ if ( sourceCol >= 0 && config. columnWidth ( sourceCol ) != width )
671
671
{
672
672
config.setColumnWidth ( sourceCol, width );
673
673
setAttributeTableConfig ( config );
@@ -840,9 +840,13 @@ void QgsDualView::previewExpressionChanged( const QString &expression )
840
840
void QgsDualView::onSortColumnChanged ()
841
841
{
842
842
QgsAttributeTableConfig cfg = mLayer ->attributeTableConfig ();
843
- cfg.setSortExpression ( mFilterModel ->sortExpression () );
844
- cfg.setSortOrder ( mFilterModel ->sortOrder () );
845
- setAttributeTableConfig ( cfg );
843
+ if ( cfg.sortExpression () != mFilterModel ->sortExpression () ||
844
+ cfg.sortOrder () != mFilterModel ->sortOrder () )
845
+ {
846
+ cfg.setSortExpression ( mFilterModel ->sortExpression () );
847
+ cfg.setSortOrder ( mFilterModel ->sortOrder () );
848
+ setAttributeTableConfig ( cfg );
849
+ }
846
850
}
847
851
848
852
void QgsDualView::sortByPreviewExpression ()
You can’t perform that action at this time.
0 commit comments