Commit 096a821c authored by dt's avatar dt
Browse files

Make the logic easier to understand for setting the startup project

On the Project Mode. Might fix a bug hjk found, which i can't reproduce.
parent 20a112d8
......@@ -316,13 +316,13 @@ void ProjectWindow::handleItem(QTreeWidgetItem *item, int column)
const QString path = item->data(2, Qt::UserRole).toString();
Project *project = findProject(path);
if (project && project->isApplication()) {
if (!(item->checkState(1) == Qt::Checked)) { // is now unchecked
if (m_session->startupProject() == project) {
item->setCheckState(1, Qt::Checked); // uncheck not supported
}
} else { // is now checked
m_session->setStartupProject(project);
}
}
if (!(item->checkState(1) == Qt::Checked)) { // is now unchecked
if (m_session->startupProject() == project) {
item->setCheckState(1, Qt::Checked); // uncheck not supported
}
} else if (project && project->isApplication()) { // is now checked
m_session->setStartupProject(project);
} else {
item->setCheckState(1, Qt::Unchecked); // check 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