Commit da2c44ee authored by Daniel Molkentin's avatar Daniel Molkentin
Browse files

text editor: enable/disable the erase button in the color dialog properly.

The button to erase a selected color in the Fonts & Colors
(groupbox 'color scheme') was not set enabled if a color was selected,
neither was it disabled if a color had been removed using the button.

Fixes: 254202
parent f4ba8f1d
......@@ -320,6 +320,7 @@ void FontSettingsPage::changeBackColor()
if (!newColor.isValid())
return;
d_ptr->ui.backgroundToolButton->setStyleSheet(colorButtonStyleSheet(newColor));
d_ptr->ui.eraseBackgroundToolButton->setEnabled(true);
const int numFormats = d_ptr->m_descriptions.size();
for (int i = 0; i < numFormats; i++) {
......@@ -344,6 +345,7 @@ void FontSettingsPage::eraseBackColor()
if (!items.isEmpty() && items.first()->isSelected())
d_ptr->m_value.formatFor(d_ptr->m_descriptions[i].name()).setBackground(newColor);
}
d_ptr->ui.eraseBackgroundToolButton->setEnabled(false);
updatePreview();
}
......
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