mirror of
https://github.com/ppy/osu.git
synced 2025-03-18 06:27:18 +08:00
Consume BindCollectionChanged
This commit is contained in:
parent
cb14d847de
commit
001cd1194c
@ -256,13 +256,13 @@ namespace osu.Game.Screens.Edit
|
||||
changeHandler.CanRedo.BindValueChanged(v => redoMenuItem.Action.Disabled = !v.NewValue, true);
|
||||
|
||||
// todo: BindCollectionChanged
|
||||
editorBeatmap.SelectedHitObjects.CollectionChanged += (_, __) =>
|
||||
editorBeatmap.SelectedHitObjects.BindCollectionChanged((_, __) =>
|
||||
{
|
||||
var hasObjects = editorBeatmap.SelectedHitObjects.Count > 0;
|
||||
|
||||
cutMenuItem.Action.Disabled = !hasObjects;
|
||||
copyMenuItem.Action.Disabled = !hasObjects;
|
||||
};
|
||||
}, true);
|
||||
|
||||
clipboard.BindValueChanged(content => pasteMenuItem.Action.Disabled = string.IsNullOrEmpty(content.NewValue));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user