🪲 Fix fire presets

This commit is contained in:
Simon Schneegans
2023-09-09 06:09:40 +02:00
parent 767035e313
commit 34a64e10fe
+4 -4
View File
@@ -116,8 +116,8 @@ export default class Effect {
dialog.bindColorButton('fire-color-5'); dialog.bindColorButton('fire-color-5');
// Connect the buttons only once. The bindPreferences can be called multiple times... // Connect the buttons only once. The bindPreferences can be called multiple times...
if (!this._isConnected) { if (!Effect._isConnected) {
this._isConnected = true; Effect._isConnected = true;
// The fire-gradient-reset button needs to be bound explicitly. // The fire-gradient-reset button needs to be bound explicitly.
dialog.getBuilder().get_object('reset-fire-colors').connect('clicked', () => { dialog.getBuilder().get_object('reset-fire-colors').connect('clicked', () => {
@@ -129,7 +129,7 @@ export default class Effect {
}); });
// Initialize the fire-preset dropdown. // Initialize the fire-preset dropdown.
this._createFirePresets(dialog); Effect._createFirePresets(dialog);
} }
} }
@@ -145,7 +145,7 @@ export default class Effect {
// ----------------------------------------------------------------------- private stuff // ----------------------------------------------------------------------- private stuff
// This populates the preset dropdown menu for the fire options. // This populates the preset dropdown menu for the fire options.
_createFirePresets(dialog) { static _createFirePresets(dialog) {
dialog.getBuilder().get_object('fire-prefs').connect('realize', (widget) => { dialog.getBuilder().get_object('fire-prefs').connect('realize', (widget) => {
const presets = [ const presets = [
{ {