mirror of
https://github.com/ppy/osu.git
synced 2025-02-22 17:22:58 +08:00
Fix bookmarks not working
We should be dealing with the array in every situation, with the exception of the database.
This commit is contained in:
parent
7fb8008e44
commit
d787c740fa
@ -78,15 +78,15 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
// Editor
|
// Editor
|
||||||
// This bookmarks stuff is necessary because DB doesn't know how to store int[]
|
// This bookmarks stuff is necessary because DB doesn't know how to store int[]
|
||||||
public string StoredBookmarks { get; set; }
|
[JsonIgnore]
|
||||||
|
public string StoredBookmarks
|
||||||
|
{
|
||||||
|
get { return string.Join(",", Bookmarks); }
|
||||||
|
set { Bookmarks = value?.Split(',').Select(v => int.Parse(v.Trim())).ToArray() ?? new int[0]; }
|
||||||
|
}
|
||||||
|
|
||||||
[Ignore]
|
[Ignore]
|
||||||
[JsonIgnore]
|
public int[] Bookmarks { get; set; } = new int[0];
|
||||||
public int[] Bookmarks
|
|
||||||
{
|
|
||||||
get { return StoredBookmarks?.Split(',').Select(int.Parse).ToArray() ?? new int[0]; }
|
|
||||||
set { StoredBookmarks = string.Join(",", value); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public double DistanceSpacing { get; set; }
|
public double DistanceSpacing { get; set; }
|
||||||
public int BeatDivisor { get; set; }
|
public int BeatDivisor { get; set; }
|
||||||
|
@ -96,6 +96,7 @@ namespace osu.Game.Screens.Edit.Components
|
|||||||
new BookmarkTimeline
|
new BookmarkTimeline
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.TopCentre,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Height = 0.35f
|
Height = 0.35f
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user