Commit 7cf04caf authored by Waqar Ahmed's avatar Waqar Ahmed Committed by Christoph Cullmann
Browse files

Switch to project after opening it

parent 82eae1d9
......@@ -644,7 +644,14 @@ void KateProjectPluginView::slotUpdateStatus(bool visible)
void KateProjectPluginView::openDirectoryOrProject()
{
const QString dir = QFileDialog::getExistingDirectory(nullptr, i18n("Choose a directory"), QDir::currentPath());
m_plugin->projectForDir(dir, true);
auto project = m_plugin->projectForDir(dir, true);
// switch to this project
if (project) {
int index = m_projectsCombo->findData(project->fileName());
if (index >= 0) {
m_projectsCombo->setCurrentIndex(index);
}
}
}
#include "kateprojectpluginview.moc"
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