Merge pull request #1634 from anna-marina/disable-spinbox-wrap-indent

Disable spinbox when it has no effect. Fix issue #1187
This commit is contained in:
Marius Kintel 2016-04-28 15:48:43 -04:00
commit 5af6ce171c

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)