]> cloud.milkyroute.net Git - dolphin.git/commitdiff
When the view is the Details or Columns one do not have in count lessThanGeneralPurpo...
authorRafael Fernández López <ereslibre@kde.org>
Tue, 25 Sep 2007 21:54:26 +0000 (21:54 +0000)
committerRafael Fernández López <ereslibre@kde.org>
Tue, 25 Sep 2007 21:54:26 +0000 (21:54 +0000)
CCMAIL: peter.penz@gmx.at

svn path=/trunk/KDE/kdebase/apps/; revision=717040

src/dolphinview.cpp

index a85e2db9ba482c08c420c825421f242ff954eabe..e790a051830ea9acc4a11107a3fc7fa5dd99c00b 100644 (file)
@@ -219,7 +219,17 @@ bool DolphinView::showHiddenFiles() const
 
 void DolphinView::setCategorizedSorting(bool categorized)
 {
-    if (!supportsCategorizedSorting() || (categorized == categorizedSorting())) {
+    if (categorized == categorizedSorting()) {
+        return;
+    }
+
+    if (!categorized && !supportsCategorizedSorting())
+    {
+        m_proxyModel->setCategorizedModel(categorized);
+        m_proxyModel->sort(m_proxyModel->sortColumn(), m_proxyModel->sortOrder());
+
+        emit categorizedSortingChanged();
+
         return;
     }
 
@@ -803,11 +813,13 @@ void DolphinView::createView()
     case DetailsView:
         m_detailsView = new DolphinDetailsView(this, m_controller);
         view = m_detailsView;
+        setCategorizedSorting(false);
         break;
 
     case ColumnView:
         m_columnView = new DolphinColumnView(this, m_controller);
         view = m_columnView;
+        setCategorizedSorting(false);
         break;
     }