Skip to content

Commit

Permalink
[dual view] Propagate sort order to feature view (e.g. selected on top)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Sep 4, 2013
1 parent c0659b9 commit d4e8e1f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gui/attributetable/qgsfeaturelistmodel.cpp
Expand Up @@ -30,6 +30,9 @@ void QgsFeatureListModel::setSourceModel( QgsAttributeTableFilterModel *sourceMo
connect( mFilterModel, SIGNAL( rowsRemoved( const QModelIndex&, int, int ) ), SLOT( onEndRemoveRows( const QModelIndex&, int, int ) ) );
connect( mFilterModel, SIGNAL( rowsAboutToBeInserted( const QModelIndex&, int, int ) ), SLOT( onBeginInsertRows( const QModelIndex&, int, int ) ) );
connect( mFilterModel, SIGNAL( rowsInserted( const QModelIndex&, int, int ) ), SLOT( onEndInsertRows( const QModelIndex&, int, int ) ) );
// propagate sort order changes from source model to views connected to this model
connect( mFilterModel, SIGNAL( layoutAboutToBeChanged() ), this, SIGNAL( layoutAboutToBeChanged() ) );
connect( mFilterModel, SIGNAL( layoutChanged() ), this, SIGNAL( layoutChanged() ) );
}
}

Expand Down Expand Up @@ -165,7 +168,6 @@ void QgsFeatureListModel::onEndInsertRows( const QModelIndex& parent, int first,
endInsertRows();
}


QModelIndex QgsFeatureListModel::mapToMaster( const QModelIndex &proxyIndex ) const
{
if ( !proxyIndex.isValid() )
Expand Down

0 comments on commit d4e8e1f

Please sign in to comment.