Skip to content
Commit c9bf4752 authored by Frank Reininghaus's avatar Frank Reininghaus
Browse files

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.

BUG: 339009
BUG: 314038
REVIEW: 120768
parent 17d9db5c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment