Commit 1cbc20a6 authored by Eike Ziller's avatar Eike Ziller

File System View: Do not try to sync with bogus editors/documents

Documents that do not have a file name associated or are marked as
temporary should not be synced with, to avoid unnecessarily switching to
the "Computer" root. Examples are the VCS log and commit editors.

Change-Id: I6bc970eb026bf257b405fbc329aed3a5f4a456c0
Reviewed-by: Tobias Hunger's avatarTobias Hunger <tobias.hunger@qt.io>
parent e6528653
...@@ -246,7 +246,7 @@ void FolderNavigationWidget::setAutoSynchronization(bool sync) ...@@ -246,7 +246,7 @@ void FolderNavigationWidget::setAutoSynchronization(bool sync)
void FolderNavigationWidget::setCurrentEditor(Core::IEditor *editor) void FolderNavigationWidget::setCurrentEditor(Core::IEditor *editor)
{ {
if (!editor) if (!editor || editor->document()->filePath().isEmpty() || editor->document()->isTemporary())
return; return;
const Utils::FileName filePath = editor->document()->filePath(); const Utils::FileName filePath = editor->document()->filePath();
// switch to most fitting root // switch to most fitting root
......
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