Commit 0abf2b58 authored by Arjen Hiemstra's avatar Arjen Hiemstra
Browse files

Only clear the current URL in ContextManager when it's actually unselected

In certain cases, we will have a current URL that is not shown in the
thumbnail view and selection will fail. In that case, do not clear the
URL because that hides the image we are currently trying to view.
parent 2548e5ff
......@@ -252,7 +252,15 @@ void ContextManager::slotSelectionChanged()
d->mSelectedFileItemListNeedsUpdate = true;
if (!d->mSelectionModel->hasSelection()) {
// There is a chance that the URL that has been passed in from the command
// line is not shown by the thumbnail view. In that case, we will not have
// a selection but we also do not want to clear the current URL, as that
// would hide the image that was requested to be shown. So check to see if
// the current URL is in the thumbnail view, and only if it is, deselect
// it.
if (d->mDirModel->indexForUrl(d->mCurrentUrl).isValid()) {
Markdown is supported
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