diff --git a/MainForm.cs b/MainForm.cs index 80185ec..c4ac8ca 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -8,6 +8,7 @@ using System.Text.Json; using System.Threading.Tasks; using System.Windows.Forms; using RokettoLaunch.Models; +using RokettoLaunch.Windows.Forms; using RyzStudio; using RyzStudio.Windows.Forms; using RyzStudio.Windows.ThemedForms; @@ -515,7 +516,22 @@ namespace RokettoLaunch this.CurrentSession.Groups = new List(); foreach (var container in flowLayoutPanel1.Controls.OfType()) { - this.CurrentSession.Groups.Add((TileGroupModel)container.Tag); + var newTag = (TileGroupModel)container.Tag; + if (newTag == null) + { + continue; + } + + newTag.Items = new List(); + + foreach (var tile in container.Controls.OfType()) + { + tile.ModelInfo.Position = container.GetCoord(tile); + + newTag.Items.Add(tile.ModelInfo); + } + + this.CurrentSession.Groups.Add(newTag); } var result = GenericResult.Create();