Skip to content
Permalink
Browse files

[dual view] Propagate sort order to feature view (e.g. selected on top)

  • Loading branch information
m-kuhn committed Sep 4, 2013
1 parent c0659b9 commit d4e8e1ff16faeea9c957e9fb49674b8b654503c7
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/gui/attributetable/qgsfeaturelistmodel.cpp
@@ -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() ) );
}
}

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


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

0 comments on commit d4e8e1f

Please sign in to comment.
You can’t perform that action at this time.