]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/dolphinview.cpp
Fix the hidden "EnlargeSmallPreviews" option
[dolphin.git] / src / views / dolphinview.cpp
index f0dc3cabacf275b906cc36c8f52f66699c56e20b..624aa185db8971a5341b506f0fcb4084827293ce 100644 (file)
@@ -122,7 +122,6 @@ DolphinView::DolphinView(const KUrl& url, QWidget* parent) :
     m_model = new KFileItemModel(this);
     m_view = new DolphinItemListView();
     m_view->setEnabledSelectionToggles(GeneralSettings::showSelectionToggle());
-    m_view->setEnlargeSmallPreviews(GeneralSettings::enlargeSmallPreviews());
     m_view->setVisibleRoles(QList<QByteArray>() << "text");
     applyModeToView();
 
@@ -130,6 +129,10 @@ DolphinView::DolphinView(const KUrl& url, QWidget* parent) :
     const int delay = GeneralSettings::autoExpandFolders() ? 750 : -1;
     controller->setAutoActivationDelay(delay);
 
+    // The EnlargeSmallPreviews setting can only be changed after the model
+    // has been set in the view by KItemListController.
+    m_view->setEnlargeSmallPreviews(GeneralSettings::enlargeSmallPreviews());
+
     m_container = new KItemListContainer(controller, this);
     m_container->installEventFilter(this);
     setFocusProxy(m_container);