mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 17:07:38 +08:00
Fix attempting to add selection boxes with no selection
E.g. because DrawableSpinner doesn't (currently) create an overlay, SelectionBox was being constructed with 0 hitobjects and then calculating a non-finite size for itself.
This commit is contained in:
parent
cbe2de33c5
commit
8d4c9eda48
@ -51,7 +51,11 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Layers
|
|||||||
|
|
||||||
private SelectionBox currentSelectionBox;
|
private SelectionBox currentSelectionBox;
|
||||||
|
|
||||||
public void AddSelectionOverlay() => AddInternal(currentSelectionBox = composer.CreateSelectionOverlay(overlayContainer));
|
public void AddSelectionOverlay()
|
||||||
|
{
|
||||||
|
if (overlayContainer.Count > 0)
|
||||||
|
AddInternal(currentSelectionBox = composer.CreateSelectionOverlay(overlayContainer));
|
||||||
|
}
|
||||||
|
|
||||||
public void RemoveSelectionOverlay()
|
public void RemoveSelectionOverlay()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user