forked from qt-creator/qt-creator
Make the show/hide environment details buttons stay at same place.
This commit is contained in:
@@ -272,25 +272,21 @@ CMakeRunConfigurationWidget::CMakeRunConfigurationWidget(CMakeRunConfiguration *
|
||||
environmentLabel->setFont(f);
|
||||
vbx->addWidget(environmentLabel);
|
||||
|
||||
QFormLayout *formlayout = new QFormLayout();
|
||||
QWidget *baseEnvironmentWidget = new QWidget;
|
||||
QHBoxLayout *baseEnvironmentLayout = new QHBoxLayout(baseEnvironmentWidget);
|
||||
baseEnvironmentLayout->setMargin(0);
|
||||
QLabel *label = new QLabel(tr("Base environment for this runconfiguration:"), this);
|
||||
|
||||
|
||||
baseEnvironmentLayout->addWidget(label);
|
||||
m_baseEnvironmentComboBox = new QComboBox(this);
|
||||
m_baseEnvironmentComboBox->addItems(QStringList()
|
||||
<< tr("Clean Environment")
|
||||
<< tr("System Environment")
|
||||
<< tr("Build Environment"));
|
||||
formlayout->addRow(label, m_baseEnvironmentComboBox);
|
||||
vbx->addLayout(formlayout);
|
||||
label->setVisible(false);
|
||||
m_baseEnvironmentComboBox->setVisible(false);
|
||||
|
||||
m_baseEnvironmentComboBox->setCurrentIndex(m_cmakeRunConfiguration->baseEnvironmentBase());
|
||||
|
||||
connect(m_baseEnvironmentComboBox, SIGNAL(currentIndexChanged(int)),
|
||||
this, SLOT(baseEnvironmentComboBoxChanged(int)));
|
||||
|
||||
baseEnvironmentLayout->addWidget(m_baseEnvironmentComboBox);
|
||||
baseEnvironmentLayout->addStretch(10);
|
||||
|
||||
connect(m_workingDirectoryEdit, SIGNAL(changed(QString)),
|
||||
this, SLOT(setWorkingDirectory()));
|
||||
@@ -298,20 +294,10 @@ CMakeRunConfigurationWidget::CMakeRunConfigurationWidget(CMakeRunConfiguration *
|
||||
connect(resetButton, SIGNAL(clicked()),
|
||||
this, SLOT(resetWorkingDirectory()));
|
||||
|
||||
m_environmentWidget = new ProjectExplorer::EnvironmentWidget(this);
|
||||
m_environmentWidget = new ProjectExplorer::EnvironmentWidget(this, baseEnvironmentWidget);
|
||||
m_environmentWidget->setBaseEnvironment(m_cmakeRunConfiguration->baseEnvironment());
|
||||
m_environmentWidget->setUserChanges(m_cmakeRunConfiguration->userEnvironmentChanges());
|
||||
|
||||
connect(m_environmentWidget, SIGNAL(switchedToSummary()),
|
||||
m_baseEnvironmentComboBox, SLOT(hide()));
|
||||
connect(m_environmentWidget, SIGNAL(switchedToDetails()),
|
||||
m_baseEnvironmentComboBox, SLOT(show()));
|
||||
|
||||
connect(m_environmentWidget, SIGNAL(switchedToSummary()),
|
||||
label, SLOT(hide()));
|
||||
connect(m_environmentWidget, SIGNAL(switchedToDetails()),
|
||||
label, SLOT(show()));
|
||||
|
||||
vbx->addWidget(m_environmentWidget);
|
||||
|
||||
connect(m_environmentWidget, SIGNAL(userChangesUpdated()),
|
||||
|
||||
Reference in New Issue
Block a user