Don't paste when empty

This commit is contained in:
Gustas
2025-12-01 15:14:25 +02:00
committed by Gustas Kažukauskas
parent 1ad1d18abf
commit b429ca7879

View File

@@ -85,7 +85,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
() => selectionFilters));
};
pasteButton.IsDisabled = () => clipboard == null;
pasteButton.IsDisabled = () => clipboard == null || (clipboard.Value.Actors.Count == 0 && clipboard.Value.Tiles.Count == 0);
pasteButton.IsHighlighted = () => editor.CurrentBrush is EditorCopyPasteBrush;
var deleteAreaSelectionButton = areaEditPanel.Get<ButtonWidget>("SELECTION_DELETE_BUTTON");