Commit abf998d6 authored by dt's avatar dt
Browse files

Fix disabling of remove runconfiguration

parent b1a121c5
...@@ -235,6 +235,8 @@ RunSettingsWidget::RunSettingsWidget(Target *target) ...@@ -235,6 +235,8 @@ RunSettingsWidget::RunSettingsWidget(Target *target)
m_ui->runConfigurationCombo->setCurrentIndex( m_ui->runConfigurationCombo->setCurrentIndex(
m_target->runConfigurations().indexOf(m_target->activeRunConfiguration())); m_target->runConfigurations().indexOf(m_target->activeRunConfiguration()));
m_ui->removeToolButton->setEnabled(m_target->runConfigurations().size() > 1);
m_runConfigurationWidget = m_target->activeRunConfiguration()->configurationWidget(); m_runConfigurationWidget = m_target->activeRunConfiguration()->configurationWidget();
layout()->addWidget(m_runConfigurationWidget); layout()->addWidget(m_runConfigurationWidget);
...@@ -295,12 +297,14 @@ void RunSettingsWidget::addRunConfiguration() ...@@ -295,12 +297,14 @@ void RunSettingsWidget::addRunConfiguration()
return; return;
m_target->addRunConfiguration(newRC); m_target->addRunConfiguration(newRC);
m_target->setActiveRunConfiguration(newRC); m_target->setActiveRunConfiguration(newRC);
m_ui->removeToolButton->setEnabled(m_target->runConfigurations().size() > 1);
} }
void RunSettingsWidget::removeRunConfiguration() void RunSettingsWidget::removeRunConfiguration()
{ {
RunConfiguration *rc = m_target->activeRunConfiguration(); RunConfiguration *rc = m_target->activeRunConfiguration();
m_target->removeRunConfiguration(rc); m_target->removeRunConfiguration(rc);
m_ui->removeToolButton->setEnabled(m_target->runConfigurations().size() > 1);
} }
void RunSettingsWidget::activeRunConfigurationChanged() void RunSettingsWidget::activeRunConfigurationChanged()
......
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