🔧 Connect fire buttons only once
This commit is contained in:
@@ -117,6 +117,10 @@ var Fire = class {
|
||||
dialog.bindColorButton('fire-color-4');
|
||||
dialog.bindColorButton('fire-color-5');
|
||||
|
||||
// Connect the buttons only once. The bindPreferences can be called multiple times...
|
||||
if (!this._isConnected) {
|
||||
this._isConnected = true;
|
||||
|
||||
// The fire-gradient-reset button needs to be bound explicitly.
|
||||
dialog.getBuilder().get_object('reset-fire-colors').connect('clicked', () => {
|
||||
dialog.getProfileSettings().reset('fire-color-1');
|
||||
@@ -129,6 +133,7 @@ var Fire = class {
|
||||
// Initialize the fire-preset dropdown.
|
||||
this._createFirePresets(dialog);
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------- API for extension.js
|
||||
|
||||
|
||||
Reference in New Issue
Block a user