Skip to content
Permalink
Browse files

Another change to allow subclasses to support drag reordering

  • Loading branch information
nyalldawson committed Jun 9, 2020
1 parent 1158b49 commit 9a4ad44ccda965105f6f42d978c695d7a912f09b
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/core/qgsmaplayermodel.cpp
@@ -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;
}
}

0 comments on commit 9a4ad44

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