diff options
| author | Peter Penz <[email protected]> | 2011-02-13 13:19:12 +0100 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2011-02-13 13:23:46 +0100 |
| commit | 596e07c0f325ea475cfa0ccc42231ea977e35c3f (patch) | |
| tree | dfb974631a2d791f5e092bd91871bc2b0260cff5 /src/views | |
| parent | b9fd6bf649141a2ded20402fdb3c7b85abb21619 (diff) | |
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.
Diffstat (limited to 'src/views')
| -rw-r--r-- | src/views/dolphinview.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 4ab16e052..db917ee5a 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -434,9 +434,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); } @@ -544,7 +548,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. @@ -554,6 +557,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(); } |
