┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Reininghaus <[email protected]>2013-10-07 09:17:48 +0200
committerFrank Reininghaus <[email protected]>2013-10-07 09:17:48 +0200
commit5bfb5031a593fbd7e0a60bd8ca869671c712db9d (patch)
tree23e39b528912d6b7586a8fdc138bc4c3867496a1
parent46a27ca937309d97153268cd11da8b9d75d3f1f4 (diff)
Reload the view if a previously unmounted device is mounted again
The problem was that DolphinViewContainer::setUrl(newUrl) was ignored if newUrl is equal to the URL which is shown in the view already. The new approach is to reload the view in that method if it is empty, to make sure that we do not miss that a previously unmounted device has been re-mounted. Thanks to Grigoriadis Grigoris for analyzing the root cause of this issue! BUG: 161385 FIXED-IN: 4.11.3
-rw-r--r--src/dolphinviewcontainer.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp
index e7c571294..c8fc757ba 100644
--- a/src/dolphinviewcontainer.cpp
+++ b/src/dolphinviewcontainer.cpp
@@ -372,6 +372,10 @@ 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