Commit 10d470fe authored by jhammen's avatar jhammen
Browse files

set window title to currently open editor on project load

parent d0bac184
......@@ -700,20 +700,26 @@ QTreeWidgetItem *MainWindow::findTreeItem(const QString &path) {
void MainWindow::loadProject() {
Project &project = projectList.currentProject();
// set intrepreter executable
ScriptRun::setExecutable(project.executable());
// populate file tree
for (int i = 0; i < project.folderCount(); ++i) {
NamedFile &folder = project.folder(i);
ui->folderTree->addTopLevelItem(toTreeFolder(folder));
}
// currently open files for this project
foreach (const QString &path, project.openFiles()) {
if (!createOrOpenEditor(path)) {
project.closeFile(path);
}
}
// set currently showing editor
EditorWidget *editor = findEditor(project.activeFile());
if (editor) {
ui->tabWidget->setCurrentWidget(editor);
setWindowTitle(editor->name());
}
// reset search widget and show tree
searchWidget->clear();
ui->leftTabWidget->setCurrentWidget(ui->folderTree);
}
......
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