Bug 314038 - Dolphin temporarily switches back to the previous folder itself when navigating through the folder tree
Summary: Dolphin temporarily switches back to the previous folder itself when navigati...
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 2.1
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-28 18:26 UTC by Frank Schaefer
Modified: 2014-10-24 16:14 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Schaefer 2013-01-28 18:26:55 UTC
When navigating between folders (going up and down in the folder tree using mouse clicks), Dolphin often switches back to the previous folder for a short time and then back to the current folder.
It can happen at any point, but it happens more often with large folders and when switching fast between them.
You can easily end up in the wrong folder when this happens !

If I had to guess, I would say that this happens because Dolphin is still busy with updating the content of the previous folder.

Reproducible: Sometimes

Steps to Reproduce:
Example:
/root/AAA/111/222
=> "up"
/root/AAA/111
=> "up"
/root/AAA
=> "up"
/root
=> select "BBB"
/root/BBB
=> select "111"
/root/BBB/111
!!!: Dolphin now switches back to /root/BBB itself
/root/BBB
!!!: Dolphin switches back to /root/BBB/111 after a short time
/root/BBB/111
=> select "222"
/root/BBB/111/222
Comment 1 Frank Reininghaus 2013-01-29 07:42:19 UTC
Thanks for the bug report! Two questions:

1. Do you use the Terminal Panel? Does the bug persist if you remove it?
2. What is your exact KDE version? The bug reminds me a bit of bug 304838 (fixed since 4.9.2).
Comment 2 Frank Schaefer 2013-01-29 19:25:08 UTC
(In reply to comment #1)
> 1. Do you use the Terminal Panel? Does the bug persist if you remove it?

Yes, most of the time, I have terminal panel open.
I've made some quick tests and it seems it doesn't occure with the terminal panel closed...

> 2. What is your exact KDE version? The bug reminds me a bit of bug 304838
> (fixed since 4.9.2).

I'm using 4.9.5.
Comment 3 Fabian 2013-04-20 22:46:57 UTC
I can confirm this problem in 4.10.2.
Comment 4 Frank Reininghaus 2014-10-24 16:14:35 UTC
Git commit c9bf4752adcba7e88d11ae77479c618799b49341 by Frank Reininghaus.
Committed on 24/10/2014 at 16:13.
Pushed by freininghaus into branch 'master'.

Make the view/Terminal Panel synchronization less error-prone

The previous solution could cause problems if the user navigates to a
different URL in one view, and then activates another split view very
quickly: the new active view might be switched to the same URL as the
first view, which is unwanted.

To fix this problem, we record a history of "cd" commands that Dolphin
sends to the Terminal Panel in a queue. If a currentDirectoryChanged
signal is received, and the new terminal directory is "dir", this patch
does the following:

1.  If the queue is empty, change the view URL to "dir".
2.  Otherwise, take the queue's head, and check if it is equal to
    "dir". If that is the case, ignore the signal and return.
3.  Go back to step 1.

This ensures that every currentDirectoryChange signal that is caused by
a "cd" that was sent from Dolphin to the terminal is ignored.
Related: bug 339009
REVIEW: 120768

M  +18   -11   dolphin/src/panels/terminal/terminalpanel.cpp
M  +3    -0    dolphin/src/panels/terminal/terminalpanel.h

http://commits.kde.org/kde-baseapps/c9bf4752adcba7e88d11ae77479c618799b49341