Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -551,6 +551,7 @@ void EnvironmentWidget::environmentCurrentIndexChanged(const QModelIndex &curren ...@@ -551,6 +551,7 @@ void EnvironmentWidget::environmentCurrentIndexChanged(const QModelIndex &curren
{ {
Q_UNUSED(previous) Q_UNUSED(previous)
if (current.isValid()) { if (current.isValid()) {
m_editButton->setEnabled(true);
if (m_model->mergedEnvironments()) { if (m_model->mergedEnvironments()) {
const QString &name = m_model->indexToVariable(current); const QString &name = m_model->indexToVariable(current);
bool modified = m_model->isInBaseEnvironment(name) && m_model->changes(name); bool modified = m_model->isInBaseEnvironment(name) && m_model->changes(name);
...@@ -562,7 +563,7 @@ void EnvironmentWidget::environmentCurrentIndexChanged(const QModelIndex &curren ...@@ -562,7 +563,7 @@ void EnvironmentWidget::environmentCurrentIndexChanged(const QModelIndex &curren
m_unsetButton->setEnabled(!m_model->isUnset(m_model->indexToVariable(current))); m_unsetButton->setEnabled(!m_model->isUnset(m_model->indexToVariable(current)));
} }
} else { } else {
m_editButton->setEnabled(current.isValid()); m_editButton->setEnabled(false);
m_removeButton->setEnabled(false); m_removeButton->setEnabled(false);
m_unsetButton->setEnabled(false); m_unsetButton->setEnabled(false);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment