Commit aed760f2 authored by Christoph Cullmann's avatar Christoph Cullmann 🍨
Browse files

avoid that we trigger setCurrentItem with invalid url, will lead to warning

parent c253ebc2
Pipeline #233671 passed with stage
in 7 minutes and 4 seconds
......@@ -128,7 +128,9 @@ KateFileBrowser::KateFileBrowser(KTextEditor::MainWindow *mainWindow, QWidget *p
// Ensure highlight current document also works after directory change
connect(m_dirOperator, &KDirOperator::finishedLoading, this, [this] {
if (m_highlightCurrentFile->isChecked() && m_autoSyncFolder->isChecked()) {
m_dirOperator->setCurrentItem(activeDocumentUrl());
if (const auto u = activeDocumentUrl(); u.isValid()) {
m_dirOperator->setCurrentItem(u);
}
}
});
}
......
Supports Markdown
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