[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    =?utf-8?q?=5Bkde-baseapps/KDE/4=2E6=5D_dolphin/src/views=3A_Impr?=
From:       Peter Penz <peter.penz19 () gmail ! com>
Date:       2011-02-13 12:26:13
Message-ID: 20110213122613.9D1A7A609B () git ! kde ! org
[Download RAW message or body]

Git commit 26e3499943477370dfdb9d0ccfd0ddca53c99c86 by Peter Penz.
Committed on 13/02/2011 at 13:19.
Pushed by ppenz into branch 'KDE/4.6'.

Improve performance when turning on the preview mode

If a change from a directory with disabled previews is done to a directory with \
enabled previews, also previews are generated for the previous directory as the \
preview-generator still contains the not updated directory lister. Because of this it \
is important to apply the view-properties after the directory-lister has been \
updated.

M  +10   -2    dolphin/src/views/dolphinview.cpp     

http://commits.kde.org/kde-baseapps/26e3499943477370dfdb9d0ccfd0ddca53c99c86

diff --git a/dolphin/src/views/dolphinview.cpp b/dolphin/src/views/dolphinview.cpp
index 29f62f7..9d46739 100644
--- a/dolphin/src/views/dolphinview.cpp
+++ b/dolphin/src/views/dolphinview.cpp
@@ -430,9 +430,13 @@ void DolphinView::refresh()
     m_active = true;
 
     createView();
-    applyViewProperties();
     reload();
 
+    // For performance reasons applying the view properties should be done after \
updating +    // the directory-lister URL with reload(). Otherwise in combination \
with enabled +    // previews the creation of already obsolete directory items gets \
triggered. +    applyViewProperties();
+
     setActive(oldActivationState);
     updateZoomLevel(oldZoomLevel);
 }
@@ -535,7 +539,6 @@ void DolphinView::setUrl(const KUrl& url)
 
     m_viewModeController->setUrl(url); // emits urlChanged, which we forward
     m_viewAccessor.prepareUrlChange(url);
-    applyViewProperties();
 
     // When changing the URL there is no need to keep the version
     // data of the previous URL.
@@ -545,6 +548,11 @@ void DolphinView::setUrl(const KUrl& url)
     connectViewAccessor();
     loadDirectory(url);
 
+    // For performance reasons applying the view properties should be done after \
updating +    // the directory-lister URL with loadDirectory(). Otherwise in \
combination with enabled +    // previews the creation of already obsolete directory \
items gets triggered. +    applyViewProperties();
+
     if (hadSelection || hasSelection()) {
         emitSelectionChangedSignal();
     }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic