Disable spinbox when it has no effect. Fix issue #1187

This commit is contained in:
Anna 2016-04-28 21:12:24 +03:00
parent 9caee5b80a
commit 24375f3226

View file

@ -504,6 +504,7 @@ void Preferences::on_comboBoxLineWrap_activated(int val)
void Preferences::on_comboBoxLineWrapIndentationStyle_activated(int val)
{
spinBoxLineWrapIndentationIndent->setDisabled(comboBoxLineWrapIndentationStyle->currentText() == "Same");
applyComboBox(comboBoxLineWrapIndentationStyle, val, Settings::Settings::lineWrapIndentationStyle);
}
@ -689,7 +690,8 @@ void Preferences::updateGUI()
this->checkBoxHighlightCurrentLine->setChecked(s->get(Settings::Settings::highlightCurrentLine).toBool());
this->checkBoxEnableBraceMatching->setChecked(s->get(Settings::Settings::enableBraceMatching).toBool());
this->checkBoxShowWarningsIn3dView->setChecked(s->get(Settings::Settings::showWarningsIn3dView).toBool());
this->checkBoxEnableLineNumbers->setChecked(s->get(Settings::Settings::enableLineNumbers).toBool());
this->checkBoxEnableLineNumbers->setChecked(s->get(Settings::Settings::enableLineNumbers).toBool());
this->spinBoxLineWrapIndentationIndent->setDisabled(this->comboBoxLineWrapIndentationStyle->currentText() == "Same");
}
void Preferences::initComboBox(QComboBox *comboBox, const Settings::SettingsEntry& entry)