diff --git a/packages/common/src/editor/screens/modding/IssueList.ts b/packages/common/src/editor/screens/modding/IssueList.ts index ae65d930..c23489af 100644 --- a/packages/common/src/editor/screens/modding/IssueList.ts +++ b/packages/common/src/editor/screens/modding/IssueList.ts @@ -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()); }); } diff --git a/packages/common/src/editor/screens/modding/IssueSection.ts b/packages/common/src/editor/screens/modding/IssueSection.ts index 89db755d..a8a01c6e 100644 --- a/packages/common/src/editor/screens/modding/IssueSection.ts +++ b/packages/common/src/editor/screens/modding/IssueSection.ts @@ -145,7 +145,10 @@ export class IssueSection extends CompositeDrawable { } } + #content?: IssueSectionContent; + createContent() { - return new IssueSectionContent(this); + this.#content ??= new IssueSectionContent(this); + return this.#content!; } } diff --git a/packages/common/src/editor/screens/modding/IssueSectionContent.ts b/packages/common/src/editor/screens/modding/IssueSectionContent.ts index 098c1f9b..f69be104 100644 --- a/packages/common/src/editor/screens/modding/IssueSectionContent.ts +++ b/packages/common/src/editor/screens/modding/IssueSectionContent.ts @@ -16,6 +16,10 @@ export class IssueSectionContent extends FillFlowContainer { }); } + override get disposeOnDeathRemoval(): boolean { + return false; + } + protected override load(dependencies: ReadonlyDependencyContainer) { super.load(dependencies);