Skip to content

Commit d4e8e1f

Browse files
committed
[dual view] Propagate sort order to feature view (e.g. selected on top)
1 parent c0659b9 commit d4e8e1f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/gui/attributetable/qgsfeaturelistmodel.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ void QgsFeatureListModel::setSourceModel( QgsAttributeTableFilterModel *sourceMo
3030
connect( mFilterModel, SIGNAL( rowsRemoved( const QModelIndex&, int, int ) ), SLOT( onEndRemoveRows( const QModelIndex&, int, int ) ) );
3131
connect( mFilterModel, SIGNAL( rowsAboutToBeInserted( const QModelIndex&, int, int ) ), SLOT( onBeginInsertRows( const QModelIndex&, int, int ) ) );
3232
connect( mFilterModel, SIGNAL( rowsInserted( const QModelIndex&, int, int ) ), SLOT( onEndInsertRows( const QModelIndex&, int, int ) ) );
33+
// propagate sort order changes from source model to views connected to this model
34+
connect( mFilterModel, SIGNAL( layoutAboutToBeChanged() ), this, SIGNAL( layoutAboutToBeChanged() ) );
35+
connect( mFilterModel, SIGNAL( layoutChanged() ), this, SIGNAL( layoutChanged() ) );
3336
}
3437
}
3538

@@ -165,7 +168,6 @@ void QgsFeatureListModel::onEndInsertRows( const QModelIndex& parent, int first,
165168
endInsertRows();
166169
}
167170

168-
169171
QModelIndex QgsFeatureListModel::mapToMaster( const QModelIndex &proxyIndex ) const
170172
{
171173
if ( !proxyIndex.isValid() )

0 commit comments

Comments
 (0)