]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix view mode-specific settings not always applying
authorFelix Ernst <fe.a.ernst@gmail.com>
Sun, 23 Oct 2022 17:37:50 +0000 (19:37 +0200)
committerFelix Ernst <felixernst@kde.org>
Thu, 27 Oct 2022 09:40:03 +0000 (09:40 +0000)
When the current view mode is different from the view mode for
which settings were changed in Dolphin's settings dialog, those
changes were sometimes not present when then changing the view
mode of a view to the view mode for which settings were changed.

This commit fixes this by always loading the settings for all view
modes in the DolphinItemListView even if the view is currently
using only one of those view modes.

src/views/dolphinitemlistview.cpp

index 60d5577b83237b927dbca4b7ffd85b6e09ee702a..5dec2b1f880e7beee53a874e2e59aa6aeaa45cc7 100644 (file)
@@ -77,8 +77,10 @@ void DolphinItemListView::setEnabledSelectionToggles(DolphinItemListView::Select
 
 void DolphinItemListView::readSettings()
 {
-    ViewModeSettings settings(itemLayout());
-    settings.readConfig();
+    // We load the settings for all view modes now because we don't load them when the view mode changes.
+    IconsModeSettings::self()->load();
+    CompactModeSettings::self()->load();
+    DetailsModeSettings::self()->load();
 
     beginTransaction();