sort by room state by default
authorsheepluva
Wed, 02 May 2012 10:57:36 +0200
changeset 6988 5d78966a79d2
parent 6987 e34415c77342
child 6989 4c35e9cf6057
sort by room state by default
QTfrontend/ui/page/pageroomslist.cpp
--- a/QTfrontend/ui/page/pageroomslist.cpp	Wed May 02 10:47:21 2012 +0200
+++ b/QTfrontend/ui/page/pageroomslist.cpp	Wed May 02 10:57:36 2012 +0200
@@ -480,12 +480,15 @@
     roomsModel->setSourceModel(model);
     roomsModel->setDynamicSortFilter(true);
     roomsModel->setSortCaseSensitivity(Qt::CaseInsensitive);
+    roomsModel->sort(0, Qt::AscendingOrder);
     roomsList->setModel(roomsModel);
 
     roomsList->hideColumn(0);
 
     QHeaderView * h = roomsList->horizontalHeader();
 
+    h->setSortIndicatorShown(true);
+
     h->setResizeMode(1, QHeaderView::Stretch);
     h->resizeSection(2, 32);
     h->resizeSection(3, 32);
@@ -501,6 +504,5 @@
 
 void PageRoomsList::onSortIndicatorChanged(int logicalIndex, Qt::SortOrder order)
 {
-    roomsList->horizontalHeader()->setSortIndicatorShown(true);
     roomsModel->sort(logicalIndex, order);
 }