Skip to content

Commit 4bd4a27

Browse files
committed
fix
1 parent 0966b2f commit 4bd4a27

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

ui/src/app/sections/effects/equalizers/equalizers.component.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, OnInit, EventEmitter, Output, ViewChild, Input } from '@angular/core'
1+
import { Component, OnInit, EventEmitter, Output, ViewChild, Input, ChangeDetectorRef } from '@angular/core'
22
import { EqualizersService, EqualizerType } from './equalizers.service'
33
import { BasicEqualizerComponent } from './basic-equalizer/basic-equalizer.component'
44
import { AdvancedEqualizerComponent } from './advanced-equalizer/advanced-equalizer.component'
@@ -35,6 +35,7 @@ export class EqualizersComponent implements OnInit {
3535
set type (newType: EqualizerType) {
3636
if (this._type === newType) return
3737
this._type = newType
38+
this.changeRef.detectChanges()
3839
this.activeEqualizer = this.getEqualizerFromType(this.type)
3940
}
4041
get type () { return this._type }
@@ -46,13 +47,16 @@ export class EqualizersComponent implements OnInit {
4647
constructor (
4748
public equalizersService: EqualizersService,
4849
public dialog: MatDialog,
49-
public ui: UIService
50+
public ui: UIService,
51+
private changeRef: ChangeDetectorRef
5052
) { }
5153

5254
async ngOnInit () {
5355
await this.sync()
5456
this.setupEvents()
5557
this.loaded = true
58+
this.changeRef.detectChanges()
59+
this.activeEqualizer = this.getEqualizerFromType(this.type)
5660
}
5761

5862
protected sync () {

0 commit comments

Comments
 (0)