mirror of https://github.com/ppy/osu
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.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 @@ public abstract class HitObjectComposer<TObject> : HitObjectComposer, IPlacement
|
|||
|
||||
private FillFlowContainer togglesCollection;
|
||||
|
||||
private IBindable<bool> hasTiming;
|
||||
|
||||
protected HitObjectComposer(Ruleset ruleset)
|
||||
{
|
||||
Ruleset = ruleset;
|
||||
|
@ -160,6 +163,14 @@ protected override void LoadComplete()
|
|||
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