Commit d33e1a82 authored by Tobias Hunger's avatar Tobias Hunger Committed by Eike Ziller

Speed up handling of projects with many RunConfigurations

Do not create/destroy the RunConfiguration widgets once for each
RunConfiguration that gets added.

Change-Id: Id5fefbff1ba4ab19fe77a24ce2a27ae9431c7dff
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 169a47fe
......@@ -126,6 +126,7 @@ RunSettingsWidget::RunSettingsWidget(Target *target)
m_runConfigurationsModel(new RunConfigurationModel(target, this)),
m_deployConfigurationModel(new DeployConfigurationModel(target, this)),
m_runConfigurationWidget(0),
m_runConfiguration(0),
m_runLayout(0),
m_deployConfigurationWidget(0),
m_deployLayout(0),
......@@ -360,6 +361,9 @@ void RunSettingsWidget::currentRunConfigurationChanged(int index)
if (index >= 0)
selectedRunConfiguration = m_runConfigurationsModel->runConfigurationAt(index);
if (selectedRunConfiguration != m_runConfiguration)
return;
m_ignoreChange = true;
m_target->setActiveRunConfiguration(selectedRunConfiguration);
m_ignoreChange = false;
......
......@@ -106,6 +106,7 @@ private:
RunConfigurationModel *m_runConfigurationsModel;
DeployConfigurationModel *m_deployConfigurationModel;
QWidget *m_runConfigurationWidget;
RunConfiguration *m_runConfiguration;
QVBoxLayout *m_runLayout;
NamedWidget *m_deployConfigurationWidget;
QVBoxLayout *m_deployLayout;
......
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