Skip to content

Commit

Permalink
Another change to allow subclasses to support drag reordering
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 9, 2020
1 parent 1158b49 commit 9a4ad44
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/qgsmaplayermodel.cpp
Expand Up @@ -438,11 +438,11 @@ QMimeData *QgsMapLayerModel::mimeData( const QModelIndexList &indexes ) const
QByteArray encodedData;
QDataStream stream( &encodedData, QIODevice::WriteOnly );

for ( const QModelIndex &index : indexes )
for ( const QModelIndex &i : indexes )
{
if ( index.isValid() )
if ( i.isValid() )
{
QString text = data( index, LayerIdRole ).toString();
QString text = data( index( i.row(), 0, i.parent() ), LayerIdRole ).toString();
stream << text;
}
}
Expand Down

0 comments on commit 9a4ad44

Please sign in to comment.