fixing buffer reordering issues
authorMarcus Eggenberger <egs@quassel-irc.org>
Mon, 9 Feb 2009 19:48:00 +0000 (20:48 +0100)
committerMarcus Eggenberger <egs@quassel-irc.org>
Mon, 9 Feb 2009 19:48:00 +0000 (20:48 +0100)
src/uisupport/bufferviewfilter.cpp

index 5a026c9..7179f26 100644 (file)
@@ -198,7 +198,7 @@ bool BufferViewFilter::dropMimeData(const QMimeData *data, Qt::DropAction action
        row = 0;
 
       if(row < rowCount(parent)) {
        row = 0;
 
       if(row < rowCount(parent)) {
-       QModelIndex source_child = sourceModel()->index(row, 0, parent);
+       QModelIndex source_child = mapToSource(index(row, 0, parent));
        BufferId beforeBufferId = sourceModel()->data(source_child, NetworkModel::BufferIdRole).value<BufferId>();
        pos = config()->bufferList().indexOf(beforeBufferId);
        if(_sortOrder == Qt::DescendingOrder)
        BufferId beforeBufferId = sourceModel()->data(source_child, NetworkModel::BufferIdRole).value<BufferId>();
        pos = config()->bufferList().indexOf(beforeBufferId);
        if(_sortOrder == Qt::DescendingOrder)