Commit ac27fe72 authored by hjk's avatar hjk

toolchain configuration: hide unusable controls in 'disabled' state

Reviewed-By: Tobias Hunger
parent cadcf727
......@@ -435,6 +435,20 @@ QList<Utils::EnvironmentItem> RvctToolChainConfigWidget::environmentChanges() co
return baseEnv.diff(resultEnv);
}
void RvctToolChainConfigWidget::changeEvent(QEvent *ev)
{
if (ev->type() == QEvent::EnabledChange) {
if (isEnabled()) {
m_ui->environmentView->horizontalHeader()->setVisible(true);
m_ui->environmentView->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
} else {
m_ui->environmentView->horizontalHeader()->setVisible(false);
m_ui->environmentView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
}
}
ToolChainConfigWidget::changeEvent(ev);
}
// ==========================================================================
// RvctToolChainFactory
// ==========================================================================
......
......@@ -147,6 +147,7 @@ public:
void apply();
void discard() { setFromToolChain(); }
bool isDirty() const;
void changeEvent(QEvent *ev);
private:
void setFromToolChain();
......
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