mirror of
https://github.com/ppy/osu
synced 2025-01-02 20:32:10 +00:00
Move guid initialisation to database model itself
This commit is contained in:
parent
2c1422b4f9
commit
8961203f08
@ -12,7 +12,7 @@ namespace osu.Game.Input.Bindings
|
||||
public class RealmKeyBinding : RealmObject, IHasGuidPrimaryKey, IKeyBinding
|
||||
{
|
||||
[PrimaryKey]
|
||||
public Guid ID { get; set; }
|
||||
public Guid ID { get; set; } = Guid.NewGuid();
|
||||
|
||||
public int? RulesetID { get; set; }
|
||||
|
||||
|
@ -74,7 +74,6 @@ namespace osu.Game.Input
|
||||
// insert any defaults which are missing.
|
||||
usage.Realm.Add(new RealmKeyBinding
|
||||
{
|
||||
ID = Guid.NewGuid(),
|
||||
KeyCombinationString = k.KeyCombination.ToString(),
|
||||
ActionInt = (int)k.Action,
|
||||
RulesetID = rulesetId,
|
||||
|
@ -370,7 +370,6 @@ namespace osu.Game
|
||||
{
|
||||
usage.Realm.Add(new RealmKeyBinding
|
||||
{
|
||||
ID = Guid.NewGuid(),
|
||||
KeyCombinationString = dkb.KeyCombination.ToString(),
|
||||
ActionInt = (int)dkb.Action,
|
||||
RulesetID = dkb.RulesetID,
|
||||
|
Loading…
Reference in New Issue
Block a user