From 7deb601f317d7c806e69d0d82d99a03d0859ca85 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Tue, 21 Feb 2012 16:46:56 +0100 Subject: Don't trigger assert when switching to details-view If the visible roles of the details-view are equal to the visible roles of other views, then switching to the details-view will trigger an assert because the invisible roles don't get updated. Thanks to Frank Reininghaus for the detailed analyses! In the context of this fix optimizations have been done when switching view-modes: The "don't-animate-workaround" could be removed. BUG: 294531 FIXED-IN: 4.8.1 --- src/views/dolphinview.cpp | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'src/views/dolphinview.cpp') diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 80be1e592..54787d28f 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -1168,19 +1168,6 @@ void DolphinView::applyViewProperties() const Mode mode = props.viewMode(); if (m_mode != mode) { - // Prevent an animated transition of the position and size of the items when switching - // the view-mode by temporary clearing the model and updating it again after the view mode - // has been modified. - const bool restoreModel = (model->count() > 0); - if (restoreModel) { - const int currentItemIndex = m_container->controller()->selectionManager()->currentItem(); - if (currentItemIndex >= 0) { - m_currentItemUrl = model->fileItem(currentItemIndex).url(); - } - m_selectedUrls = selectedItems().urlList(); - model->clear(); - } - const Mode previousMode = m_mode; m_mode = mode; @@ -1201,10 +1188,6 @@ void DolphinView::applyViewProperties() if (m_container->zoomLevel() != oldZoomLevel) { emit zoomLevelChanged(m_container->zoomLevel(), oldZoomLevel); } - - if (restoreModel) { - loadDirectory(url()); - } } const bool hiddenFilesShown = props.hiddenFilesShown(); -- cgit v1.3