QTfrontend/ui/page/pageroomslist.cpp
changeset 6989 4c35e9cf6057
parent 6988 5d78966a79d2
child 6991 1ec44dde5eb9
--- a/QTfrontend/ui/page/pageroomslist.cpp	Wed May 02 10:57:36 2012 +0200
+++ b/QTfrontend/ui/page/pageroomslist.cpp	Wed May 02 11:28:38 2012 +0200
@@ -504,5 +504,9 @@
 
 void PageRoomsList::onSortIndicatorChanged(int logicalIndex, Qt::SortOrder order)
 {
-    roomsModel->sort(logicalIndex, order);
+    // three state sorting: asc -> dsc -> default (by room state)
+    if ((order == Qt::AscendingOrder) && (logicalIndex == roomsModel->sortColumn()))
+        roomsList->horizontalHeader()->setSortIndicator(0, Qt::AscendingOrder);
+    else
+        roomsModel->sort(logicalIndex, order);
 }