Do not call event handlers since pickr calls them, too.

This commit is contained in:
kovacsv 2021-11-30 21:20:42 +01:00
parent 07fe1d5509
commit afb724fb3b

View File

@ -361,9 +361,7 @@ OV.SettingsSidebarPanel = class extends OV.SidebarPanel
let resetToDefaultsButton = OV.AddDiv (this.contentDiv, 'ov_button outline ov_sidebar_button', 'Reset to Default');
resetToDefaultsButton.addEventListener ('click', () => {
this.backgroundColorInput.pickr.setColor ('#' + OV.ColorToHexString (defaultSettings.backgroundColor));
this.callbacks.onBackgroundColorChange (defaultSettings.backgroundColor);
this.defaultColorInput.pickr.setColor ('#' + OV.ColorToHexString (defaultSettings.defaultColor));
this.callbacks.onDefaultColorChange (defaultSettings.defaultColor);
if (this.themeInput !== null) {
this.themeInput.select (defaultSettings.themeId);
this.callbacks.onThemeChange (defaultSettings.themeId);