Skip to content

Fix cannot delete the lyric if contains time. #1202

Open
@andy840119

Description

@andy840119

image
It will cause the error in the perform on selecting.

Here's the call stack:

System.InvalidOperationException: Can not change depth of drawable which is not contained within this CompositeDrawable.
   at osu.Framework.Graphics.Containers.CompositeDrawable.ChangeInternalChildDepth(Drawable child, Single newDepth)
   at osu.Framework.Graphics.Containers.Container`1.ChangeChildDepth(T child, Single newDepth)
   at osu.Framework.Graphics.Containers.Container`1.ChangeChildDepth(T child, Single newDepth)
   at osu.Game.Screens.Edit.Compose.Components.BlueprintContainer`1.OnBlueprintDeselected(SelectionBlueprint`1 blueprint)
   at osu.Game.Screens.Edit.Compose.Components.EditorBlueprintContainer.OnBlueprintDeselected(SelectionBlueprint`1 blueprint)
   at osu.Game.Rulesets.Edit.SelectionBlueprint`1.updateState()
   at osu.Game.Rulesets.Edit.SelectionBlueprint`1.set_State(SelectionState value)
   at osu.Game.Rulesets.Edit.SelectionBlueprint`1.Deselect()
   at osu.Game.Screens.Edit.Compose.Components.BlueprintContainer`1.RemoveBlueprintFor(T item)
   at osu.Game.Screens.Edit.EditorBeatmap.UpdateState()
   at osu.Game.Screens.Edit.TransactionalCommitComponent.EndChange()
   at osu.Game.Screens.Edit.EditorBeatmap.PerformOnSelection(Action`1 action)
   at osu.Game.Rulesets.Karaoke.Edit.ChangeHandlers.HitObjectChangeHandler`1.PerformOnSelection(Action`1 action) in D:\Github\karaoke-dev\karaoke\osu.Game.Rulesets.Karaoke\Edit\ChangeHandlers\HitObjectChangeHandler.cs:line 27
   at osu.Game.Rulesets.Karaoke.Edit.ChangeHandlers.Lyrics.LyricsChangeHandler.Split(Int32 index) in D:\Github\karaoke-dev\karaoke\osu.Game.Rulesets.Karaoke\Edit\ChangeHandlers\Lyrics\LyricsChangeHandler.cs:line 18
   at osu.Game.Rulesets.Karaoke.Edit.Lyrics.Rows.EditLyricRow.SingleLyricEditor.OnDoubleClick(DoubleClickEvent e) in D:\Github\karaoke-dev\karaoke\osu.Game.Rulesets.Karaoke\Edit\Lyrics\Rows\EditLyricRow.cs:line 424
   at osu.Framework.Graphics.Drawable.TriggerEvent(UIEvent e)
   at osu.Framework.Input.ButtonEventManager`1.<>c__DisplayClass14_0.<PropagateButtonEvent>b__0(Drawable target)
   at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
   at osu.Framework.Input.ButtonEventManager`1.PropagateButtonEvent(IEnumerable`1 drawables, UIEvent e)
   at osu.Framework.Input.MouseButtonEventManager.handleDoubleClick(InputState state, List`1 targets)
   at osu.Framework.Input.MouseButtonEventManager.HandleButtonDown(InputState state, List`1 targets)
   at osu.Framework.Input.ButtonEventManager`1.handleButtonDown(InputState state)
   at osu.Framework.Input.ButtonEventManager`1.HandleButtonStateChange(InputState state, ButtonStateChangeKind kind)
   at osu.Framework.Input.InputManager.HandleMouseButtonStateChange(ButtonStateChangeEvent`1 e)
   at osu.Framework.Input.InputManager.HandleInputStateChange(InputStateChangeEvent inputStateChange)
   at osu.Framework.Input.UserInputManager.HandleInputStateChange(InputStateChangeEvent inputStateChange)
   at osu.Framework.Input.StateChanges.ButtonInput`1.Apply(InputState state, IInputStateChangeHandler handler)
   at osu.Framework.Input.StateChanges.MouseButtonInput.Apply(InputState state, IInputStateChangeHandler handler)
   at osu.Framework.Input.InputManager.Update()
   at osu.Framework.Input.PassThroughInputManager.Update()
   at osu.Framework.Graphics.Drawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Platform.GameHost.UpdateFrame()
   at osu.Framework.Threading.GameThread.processFrame()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions