1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-07 02:53:38 +08:00

Fix undoing bookmark operations potentially making them unsorted

Found in testing of previous commit. This would break seeking between
bookmarks.

Reproduction steps on `master`:

- open map with bookmark
- delete the first bookmark
- undo the deletion of the first bookmark
- seek to previous bookmark will now always seek to the first bookmark
  rather than closest preceding regardless of current clock time
This commit is contained in:
Bartłomiej Dach
2025-02-05 15:30:11 +01:00
Unverified
parent abce42b1c8
commit 4cbfb51707
@@ -115,7 +115,9 @@ namespace osu.Game.Screens.Edit
if (editorBeatmap.Bookmarks.Contains(newBookmark))
continue;
editorBeatmap.Bookmarks.Add(newBookmark);
int idx = editorBeatmap.Bookmarks.BinarySearch(newBookmark);
if (idx < 0)
editorBeatmap.Bookmarks.Insert(~idx, newBookmark);
}
}