Skip to content

Commit 4b36a6b

Browse files
committed
Update GameEditTab4Model.cs
1 parent bc7df11 commit 4b36a6b

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/ColorMC.Gui/UI/Model/GameEdit/GameEditTab4Model.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.IO;
34
using System.Linq;
45
using System.Text;
56
using System.Threading.Tasks;
@@ -832,7 +833,7 @@ public async void SetProjectId(ModNodeModel mod)
832833
{
833834
return;
834835
}
835-
else if (!pid || !fid)
836+
else if (pid || fid)
836837
{
837838
Window.Show(LangUtils.Get("GameEditWindow.Tab4.Text51"));
838839
return;
@@ -846,8 +847,13 @@ public async void SetProjectId(ModNodeModel mod)
846847
Window.Show(LangUtils.Get("GameEditWindow.Tab4.Text51"));
847848
}
848849
else
849-
{
850+
{
851+
info.File = Path.GetFileName(mod.Local);
850852
mod.Obj1 = info;
853+
if (!_obj.Mods.TryAdd(info.ModId, info))
854+
{
855+
_obj.Mods[info.ModId] = info;
856+
}
851857
mod.Update();
852858
}
853859
}

0 commit comments

Comments
 (0)