More work on name validation

This commit is contained in:
2026-04-09 22:41:38 -04:00
parent d98c0081e6
commit ad6a33582b
8 changed files with 27 additions and 31 deletions

View File

@@ -66,13 +66,9 @@ public:
}
// Validate the proposed name.
FName InternalID = WingUtils::CheckProposedName(Name, WingOut::Stdout);
TSet<FName> InUse = WingUtils::GetAllInUseNames(BP);
FName InternalID = WingUtils::CheckProposedName(Name, InUse, WingOut::Stdout);
if (InternalID.IsNone()) return;
// Check that the name is unique among existing widgets.
TSet<FName> Names;
WingUtils::GetAllInUseNames(BP, Names);
if (!WingUtils::FindNoDuplicateName(Names, InternalID, TEXT("widget or variable"), WingOut::Stdout)) return;
// If a parent is specified, find it and verify it's a panel.
UPanelWidget* ParentPanel = nullptr;