summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels/qitemselectionmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/itemmodels/qitemselectionmodel.cpp')
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/itemmodels/qitemselectionmodel.cpp b/src/corelib/itemmodels/qitemselectionmodel.cpp
index 6c7101d41f..7714aa5e46 100644
--- a/src/corelib/itemmodels/qitemselectionmodel.cpp
+++ b/src/corelib/itemmodels/qitemselectionmodel.cpp
@@ -942,13 +942,14 @@ static QItemSelection mergeRowLengths(const QVector<QPair<QPersistentModelIndex,
const uint nextLength = rowLengths.at(i).second;
if ((nextLength == length)
&& (next.row() == br.row() + 1)
+ && (next.column() == br.column())
&& (next.parent() == br.parent())) {
br = next;
} else {
break;
}
}
- result.append(QItemSelectionRange(tl, br.sibling(br.row(), length - 1)));
+ result.append(QItemSelectionRange(tl, br.sibling(br.row(), br.column() + length - 1)));
}
return result;
}