summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews/qtreewidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/itemviews/qtreewidget.cpp')
-rw-r--r--src/gui/itemviews/qtreewidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/itemviews/qtreewidget.cpp b/src/gui/itemviews/qtreewidget.cpp
index 06342d8..040c498 100644
--- a/src/gui/itemviews/qtreewidget.cpp
+++ b/src/gui/itemviews/qtreewidget.cpp
@@ -623,7 +623,7 @@ void QTreeModel::ensureSorted(int column, Qt::SortOrder order,
lit = sortedInsertionIterator(lit, lst.end(), order, item);
int newRow = qMax(lit - lst.begin(), 0);
- if ((newRow < oldRow) && !(*item < *lst.at(oldRow - 1)))
+ if ((newRow < oldRow) && !(*item < *lst.at(oldRow - 1)) && !(*lst.at(oldRow - 1) < *item ))
newRow = oldRow;
lit = lst.insert(lit, item);