mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 14:24:10 +02:00
Fixed emit view cases in generics with multiple emit locations
This commit is contained in:
parent
2802bf87b2
commit
9000cafd73
1 changed files with 13 additions and 2 deletions
|
@ -6137,7 +6137,18 @@ namespace IDE.ui
|
||||||
}
|
}
|
||||||
|
|
||||||
if (emitEmbed.mView != null)
|
if (emitEmbed.mView != null)
|
||||||
emitViewDict[emitEmbed.mTypeName] = emitEmbed.mView;
|
{
|
||||||
|
if (emitViewDict.TryAdd(emitEmbed.mTypeName, var keyPtr, var valuePtr))
|
||||||
|
{
|
||||||
|
*valuePtr = emitEmbed.mView;
|
||||||
|
}
|
||||||
|
else if (emitEmbed.mView.mTypeName != emitEmbed.mTypeName)
|
||||||
|
{
|
||||||
|
emitEmbed.mView.RemoveSelf();
|
||||||
|
DeleteAndNullify!(emitEmbed.mView);
|
||||||
|
ewc.mCollapseNeedsUpdate = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6146,7 +6157,7 @@ namespace IDE.ui
|
||||||
if (embed.mCharData == null)
|
if (embed.mCharData == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (emitViewDict.GetValue(embed.mTypeName) case .Ok(var emitEmbedView))
|
if (emitViewDict.GetAndRemove(embed.mTypeName) case .Ok((var name, var emitEmbedView)))
|
||||||
{
|
{
|
||||||
var emitEmbed = emitEmbedView.mEmitEmbed;
|
var emitEmbed = emitEmbedView.mEmitEmbed;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue