Enable the Apply button in the preferences dialog after a color is changed

This commit is contained in:
Thomas Goyne 2014-06-27 11:10:28 -07:00
parent 4accc988b3
commit dab67c6267
1 changed files with 2 additions and 4 deletions

View File

@ -635,13 +635,11 @@ void Interface_Hotkeys::OnUpdateFilter(wxCommandEvent&) {
void Preferences::SetOption(std::unique_ptr<agi::OptionValue> new_value) { void Preferences::SetOption(std::unique_ptr<agi::OptionValue> new_value) {
pending_changes[new_value->GetName()] = std::move(new_value); pending_changes[new_value->GetName()] = std::move(new_value);
if (IsEnabled())
applyButton->Enable(true); applyButton->Enable(true);
} }
void Preferences::AddPendingChange(Thunk const& callback) { void Preferences::AddPendingChange(Thunk const& callback) {
pending_callbacks.push_back(callback); pending_callbacks.push_back(callback);
if (IsEnabled())
applyButton->Enable(true); applyButton->Enable(true);
} }