From: Rafael Fernández López Date: Tue, 25 Sep 2007 21:54:26 +0000 (+0000) Subject: When the view is the Details or Columns one do not have in count lessThanGeneralPurpo... X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/ccea74a99aefcb2c69db4d8307a4bb8b398ed90d?ds=sidebyside When the view is the Details or Columns one do not have in count lessThanGeneralPurpose. For that we need to force the proxy model to not to be categorized. CCMAIL: peter.penz@gmx.at svn path=/trunk/KDE/kdebase/apps/; revision=717040 --- diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index a85e2db9b..e790a0518 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -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; }