Fix parsing canceld on project load

Task-Nr: QTCREATORBUG-1616
This commit is contained in:
dt
2010-06-15 14:44:15 +02:00
parent c7db4a09c8
commit 90a85a9b1e
4 changed files with 27 additions and 24 deletions

View File

@@ -111,23 +111,25 @@ void TargetSettingsPanelWidget::setupUi()
noTargetLayout->addStretch(10);
m_centralWidget->addWidget(m_noTargetLabel);
connect(m_selector, SIGNAL(currentChanged(int,int)),
this, SLOT(currentTargetChanged(int,int)));
// Save active target now as it will change when targets are added:
Target *activeTarget = m_project->activeTarget();
foreach (Target *t, m_project->targets())
targetAdded(t);
// Now set the correct target
int index = m_targets.indexOf(m_project->activeTarget());
m_selector->setCurrentIndex(index);
m_selector->setCurrentSubIndex(0);
currentTargetChanged(index, 0);
connect(m_selector, SIGNAL(currentChanged(int,int)),
this, SLOT(currentTargetChanged(int,int)));
connect(m_selector, SIGNAL(addButtonClicked()),
this, SLOT(addTarget()));
connect(m_selector, SIGNAL(removeButtonClicked()),
this, SLOT(removeTarget()));
updateTargetAddAndRemoveButtons();
activeTargetChanged(activeTarget);
}
void TargetSettingsPanelWidget::currentTargetChanged(int targetIndex, int subIndex)