mirror of
https://github.com/ppy/osu
synced 2025-02-04 04:11:54 +00:00
Ensure tool is always set back to select tool when beatmap becomes untimed
This commit is contained in:
parent
bde35d9f21
commit
b29209d13f
@ -6,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Input;
|
||||
@ -67,6 +68,8 @@ namespace osu.Game.Rulesets.Edit
|
||||
|
||||
private FillFlowContainer togglesCollection;
|
||||
|
||||
private IBindable<bool> hasTiming;
|
||||
|
||||
protected HitObjectComposer(Ruleset ruleset)
|
||||
{
|
||||
Ruleset = ruleset;
|
||||
@ -160,6 +163,14 @@ namespace osu.Game.Rulesets.Edit
|
||||
base.LoadComplete();
|
||||
|
||||
inputManager = GetContainingInputManager();
|
||||
|
||||
hasTiming = EditorBeatmap.HasTiming.GetBoundCopy();
|
||||
hasTiming.BindValueChanged(timing =>
|
||||
{
|
||||
// it's important this is performed before the similar code in EditorRadioButton disables the button.
|
||||
if (!timing.NewValue)
|
||||
setSelectTool();
|
||||
});
|
||||
}
|
||||
|
||||
public override Playfield Playfield => drawableRulesetWrapper.Playfield;
|
||||
|
Loading…
Reference in New Issue
Block a user