1616using osu . Framework . Input . Events ;
1717using osu . Framework . Utils ;
1818using osu . Game . Audio ;
19- using osu . Game . Configuration ;
2019using osu . Game . Graphics ;
2120using osu . Game . Graphics . UserInterface ;
2221using osu . Game . Graphics . UserInterfaceV2 ;
@@ -57,9 +56,8 @@ public SamplePointPiece(HitObject hitObject)
5756 protected virtual double GetTime ( ) => HitObject is IHasRepeats r ? HitObject . StartTime + r . Duration / r . SpanCount ( ) / 2 : HitObject . StartTime ;
5857
5958 [ BackgroundDependencyLoader ]
60- private void load ( OsuConfigManager config )
59+ private void load ( )
6160 {
62- HitObject . DefaultsApplied += _ => updateText ( ) ;
6361 Label . AllowMultiline = false ;
6462 LabelContainer . AutoSizeAxes = Axes . None ;
6563 updateText ( ) ;
@@ -74,6 +72,8 @@ protected override void LoadComplete()
7472 {
7573 base . LoadComplete ( ) ;
7674
75+ HitObject . DefaultsApplied += onDefaultsApplied ;
76+
7777 if ( timelineBlueprintContainer != null )
7878 contracted . BindTo ( timelineBlueprintContainer . SamplePointContracted ) ;
7979
@@ -96,12 +96,19 @@ protected override void LoadComplete()
9696 FinishTransforms ( ) ;
9797 }
9898
99+ private void onDefaultsApplied ( HitObject hitObject )
100+ {
101+ updateText ( ) ;
102+ }
103+
99104 protected override void Dispose ( bool isDisposing )
100105 {
101106 base . Dispose ( isDisposing ) ;
102107
103108 if ( editor != null )
104109 editor . ShowSampleEditPopoverRequested -= onShowSampleEditPopoverRequested ;
110+
111+ HitObject . DefaultsApplied -= onDefaultsApplied ;
105112 }
106113
107114 private void onShowSampleEditPopoverRequested ( double time )
0 commit comments