Skip to content

Commit

Permalink
Fix slider selection blueprint not removing listener on free
Browse files Browse the repository at this point in the history
  • Loading branch information
Marvin Schürz committed Jan 17, 2025
1 parent 5baf690 commit eba458b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export class SliderSelectionBlueprint extends OsuSelectionBlueprint<Slider> {

const hitObject = entry.hitObject as Slider;

hitObject.path.invalidated.addListener(this.#updatePositions, this);
hitObject.path.invalidated.removeListener(this.#updatePositions, this);
}

protected override onDefaultsApplied(hitObject: HitObject) {
Expand Down Expand Up @@ -166,6 +166,8 @@ export class SliderSelectionBlueprint extends OsuSelectionBlueprint<Slider> {
}

#updatePositions() {
if (!this.hitObject)
return;
this.position = this.hitObject!.stackedPosition;
this.tailCircle.position = this.hitObject!.path.endPosition;
}
Expand Down

0 comments on commit eba458b

Please sign in to comment.