mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-07-18 03:24:15 -04:00
Fixed #282
This commit is contained in:
@ -185,15 +185,27 @@ namespace AssetStudio
|
||||
{
|
||||
public static ImportedFrame FindFrame(string name, ImportedFrame root)
|
||||
{
|
||||
ImportedFrame frame = root;
|
||||
if ((frame != null) && (frame.Name == name))
|
||||
if (root.Name == name)
|
||||
{
|
||||
return frame;
|
||||
return root;
|
||||
}
|
||||
|
||||
for (int i = 0; i < root.Count; i++)
|
||||
foreach (var child in root)
|
||||
{
|
||||
if ((frame = FindFrame(name, root[i])) != null)
|
||||
var frame = FindFrame(name, child);
|
||||
if (frame != null)
|
||||
{
|
||||
return frame;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static ImportedFrame FindChild(string name, ImportedFrame root)
|
||||
{
|
||||
foreach (var child in root)
|
||||
{
|
||||
var frame = FindFrame(name, child);
|
||||
if (frame != null)
|
||||
{
|
||||
return frame;
|
||||
}
|
||||
|
Reference in New Issue
Block a user