┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views/dolphinview.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2012-02-21 16:46:56 +0100
committerPeter Penz <[email protected]>2012-02-21 16:49:38 +0100
commit7deb601f317d7c806e69d0d82d99a03d0859ca85 (patch)
tree49f4347edb8377156b19e52708a01690795bfd5b /src/views/dolphinview.cpp
parenta89bc63f6c2807e92c4e8f9b860ae32d93014e96 (diff)
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
Diffstat (limited to 'src/views/dolphinview.cpp')
-rw-r--r--src/views/dolphinview.cpp17
1 files changed, 0 insertions, 17 deletions
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();