Commit 5c856670 authored by dt's avatar dt
Browse files

Break a infinite loop.

Removing the last project did set startupproject to zero and unloaded
the project. Thus the check that the project for the current item and
the startup project are both null and the same.
parent f35a0f54
......@@ -310,12 +310,14 @@ void ProjectWindow::handleCurrentItemChanged(QTreeWidgetItem *current)
void ProjectWindow::handleItem(QTreeWidgetItem *item, int column)
{
if (!item || column != 1) // startup project
return;
const QString path = item->data(2, Qt::UserRole).toString();
Project *project = findProject(path);
// Project no longer exists
if (!project)
return;
if (!(item->checkState(1) == Qt::Checked)) { // is now unchecked
if (m_session->startupProject() == project) {
item->setCheckState(1, Qt::Checked); // uncheck not supported
......
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