From 63a356c894785e997b4765766fac17584dfad86f Mon Sep 17 00:00:00 2001 From: Ray Date: Sun, 21 Jul 2024 17:06:07 +0100 Subject: [PATCH] Fixed new changes not being saved --- MainForm.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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();