From f55119945f0edc369b53c64b45ae117dc73ff426 Mon Sep 17 00:00:00 2001 From: Frank Reininghaus Date: Sat, 26 Oct 2013 09:24:04 +0200 Subject: Fix broken view state restoration The fix for bug 161385 (which was about Dolphin still showing an empty view if a device that had been unmounted earlier was clicked in the Places Panel) caused a regression: the view state (current item, scroll position, Details View expansion state) was not restored any more when going "Back". The reason is that "m_view->reload()" in DolphinViewContainer::setUrl(const KUrl& newUrl) was always executed just after entering a directory, and that command overwrites this information. Distinguishing between "change URL" and "reload the view" works better if it's done in DolphinMainWindow instead of DolphinViewContainer. BUG: 326039 FIXED-IN: 4.11.3 REVIEW: 113290 --- src/dolphinviewcontainer.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/dolphinviewcontainer.cpp') diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index c8fc757ba..e7c571294 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -372,10 +372,6 @@ void DolphinViewContainer::setUrl(const KUrl& newUrl) { if (newUrl != m_urlNavigator->locationUrl()) { m_urlNavigator->setLocationUrl(newUrl); - } else if (m_view->itemsCount() == 0) { - // Maybe a previously unmounted device has been mounted again. - // Let's reload the view to be safe (see https://bugs.kde.org/show_bug.cgi?id=161385). - m_view->reload(); } #ifdef KActivities_FOUND -- cgit v1.3