Skip to content

Commit

Permalink
Fix hitsound waveform disappearing when switching between difficulties
Browse files Browse the repository at this point in the history
  • Loading branch information
Marvin Schürz committed Jan 6, 2025
1 parent 602ba80 commit 1bdef50
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/common/src/editor/screens/modding/IssueList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class IssueList extends Container {
}

this.activeBeatmap.addOnChangeListener((beatmap) => {
this.#currentSectionContent.expire();
this.remove(this.#currentSectionContent, false);
this.add(this.#currentSectionContent = this.#beatmapIssues.get(beatmap.value)!.createContent());
});
}
Expand Down
5 changes: 4 additions & 1 deletion packages/common/src/editor/screens/modding/IssueSection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,10 @@ export class IssueSection extends CompositeDrawable {
}
}

#content?: IssueSectionContent;

createContent() {
return new IssueSectionContent(this);
this.#content ??= new IssueSectionContent(this);
return this.#content!;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ export class IssueSectionContent extends FillFlowContainer {
});
}

override get disposeOnDeathRemoval(): boolean {
return false;
}

protected override load(dependencies: ReadonlyDependencyContainer) {
super.load(dependencies);

Expand Down

0 comments on commit 1bdef50

Please sign in to comment.