Commit 405efcee authored by Christoph Cullmann's avatar Christoph Cullmann 🐮 Committed by Waqar Ahmed
Browse files

do nothing if use canceled project open

BUG: 447194
(cherry picked from commit 4cae287c)
parent 5abbcb31
......@@ -721,10 +721,14 @@ void KateProjectPluginView::slotUpdateStatus(bool visible)
void KateProjectPluginView::openDirectoryOrProject()
const QString dir = QFileDialog::getExistingDirectory(nullptr, i18n("Choose a directory"), QDir::currentPath());
auto project = m_plugin->projectForDir(dir, true);
// switch to this project
if (project) {
// get dir or do nothing
const QString dir = QFileDialog::getExistingDirectory(m_mainWindow->window(), i18n("Choose a directory"), QDir::currentPath());
if (dir.isEmpty()) {
// switch to this project if there
if (auto project = m_plugin->projectForDir(dir, true)) {
int index = m_projectsCombo->findData(project->fileName());
if (index >= 0) {
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