Commit 153f6aab authored by dt's avatar dt
Browse files

Fix a small bug that made the Edit on some environment pages disabled

parent 4267de47
......@@ -551,6 +551,7 @@ void EnvironmentWidget::environmentCurrentIndexChanged(const QModelIndex &curren
{
Q_UNUSED(previous)
if (current.isValid()) {
m_editButton->setEnabled(true);
if (m_model->mergedEnvironments()) {
const QString &name = m_model->indexToVariable(current);
bool modified = m_model->isInBaseEnvironment(name) && m_model->changes(name);
......@@ -562,7 +563,7 @@ void EnvironmentWidget::environmentCurrentIndexChanged(const QModelIndex &curren
m_unsetButton->setEnabled(!m_model->isUnset(m_model->indexToVariable(current)));
}
} else {
m_editButton->setEnabled(current.isValid());
m_editButton->setEnabled(false);
m_removeButton->setEnabled(false);
m_unsetButton->setEnabled(false);
}
......
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