MCPcopy Create free account
hub / github.com/MothCocoon/FlowGraph / OnFlowAssetChanged

Method OnFlowAssetChanged

Source/FlowEditor/Private/Find/FindInFlow.cpp:60–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58TMap<TWeakObjectPtr<UEdGraphNode>, TMap<EFlowSearchFlags, TSet<FString>>> FFindInFlowCache::CategoryStringCache;
59
60void FFindInFlowCache::OnFlowAssetChanged(UFlowAsset& ChangedFlowAsset)
61{
62 TArray<TWeakObjectPtr<UEdGraphNode>> EntriesToRemove;
63
64 for (const auto& KV : CategoryStringCache)
65 {
66 const TWeakObjectPtr<UEdGraphNode>& EdNodePtr = KV.Key;
67
68 UEdGraphNode* EdNode = EdNodePtr.Get();
69
70 if (!IsValid(EdNode))
71 {
72 EntriesToRemove.Add(EdNodePtr);
73
74 continue;
75 }
76
77 UEdGraph* EdGraph = ChangedFlowAsset.GetGraph();
78 if (EdGraph->Nodes.Contains(EdNode))
79 {
80 EntriesToRemove.Add(EdNodePtr);
81 }
82 }
83
84 for (const TWeakObjectPtr<UEdGraphNode>& EdNodePtr : EntriesToRemove)
85 {
86 CategoryStringCache.Remove(EdNodePtr);
87 }
88}
89
90//////////////////////////////////////////////////////////////////////////
91// FFindInFlowResult

Callers

nothing calls this directly

Calls 2

IsValidFunction · 0.85
GetMethod · 0.80

Tested by

no test coverage detected