diff --git a/WebWindowComplex/Models/Inglesina.cs b/WebWindowComplex/Models/Inglesina.cs index 3d329a8..0873c57 100644 --- a/WebWindowComplex/Models/Inglesina.cs +++ b/WebWindowComplex/Models/Inglesina.cs @@ -123,13 +123,10 @@ namespace WebWindowComplex.Models if (nSplitQtyVert == 0) { ParentArea.AreaList.Remove(this); - Fill newFill = Fill.CreateFill(ParentArea, FillTypes.GLASS); - newFill.SetAreaType(AreaTypes.FILL); - ParentArea.AreaList.Add(newFill); } else { - ElemDimHorizList.RemoveAt(0); + ElemDimHorizList.Clear(); SetSplitShape(SplitShapes.VERTICAL); SetSplitStartVert(true); // Controllo quanti split orizzontali ci sono @@ -228,11 +225,8 @@ namespace WebWindowComplex.Models List elemDimList = ElemDimHorizList.Where(x => x.nSubArea == subArea).OrderByDescending(x => x.nIndex).ToList(); for (var SplitIndex = elemDimList.Count - 1; SplitIndex >= value; SplitIndex += -1) { - elemDimList.RemoveAt(elemDimList.Count - 1); + ElemDimHorizList.Remove(elemDimList.ElementAt(elemDimList.Count - 1)); } - //SplitElementDimension? removeElem = ElemDimHorizList.Where(x => x.nSubArea == subArea).OrderByDescending(x => x.nIndex).FirstOrDefault(); - //if (removeElem != null) - // ElemDimHorizList.Remove(removeElem); } } else @@ -269,13 +263,10 @@ namespace WebWindowComplex.Models if (nSplitQtyHoriz == 0) { ParentArea.AreaList.Remove(this); - Fill newFill = Fill.CreateFill(ParentArea, FillTypes.GLASS); - newFill.SetAreaType(AreaTypes.FILL); - ParentArea.AreaList.Add(newFill); } else { - ElemDimVertList.RemoveAt(0); + ElemDimVertList.Clear(); SetSplitShape(SplitShapes.HORIZONTAL); SetSplitStartVert(false); // Controllo quanti split orizzontali ci sono @@ -386,8 +377,8 @@ namespace WebWindowComplex.Models // Rimuovo da tutte le sottoaree degli element l'ultimo elemento for (int subArea = 1; subArea <= ElemDimVertList.Max(x => x.nSubArea); subArea++) { - SplitElementDimension removeElem = ElemDimVertList.Where(x => x.nSubArea == subArea).OrderByDescending(x => x.nIndex).FirstOrDefault(); - ElemDimVertList.Remove(removeElem); + List elemDimList = ElemDimVertList.Where(x => x.nSubArea == subArea).OrderByDescending(x => x.nIndex).ToList(); + ElemDimVertList.Remove(elemDimList.ElementAt(elemDimList.Count - 1)); } } } diff --git a/WebWindowComplex/TableComp.razor.cs b/WebWindowComplex/TableComp.razor.cs index 4438c90..3f1fcd8 100644 --- a/WebWindowComplex/TableComp.razor.cs +++ b/WebWindowComplex/TableComp.razor.cs @@ -1351,10 +1351,16 @@ namespace WebWindowComplex for (int i = 0; i < SashGroupList.Count; i++) { if ((string.IsNullOrEmpty(SashGroupList.ElementAt(i).SelFamilyHardware)) && - prevHardware != null && prevHardware.Count > 0 && - SashGroupList.ElementAt(i).nSashQty == prevHardware.ElementAt(i).SashQty) + prevHardware != null && prevHardware.Count > 0) { - SashGroupList.ElementAt(i).SetSelFamilyHardwareFromIndex(prevHardware.ElementAt(i).Id); + if(i >= prevHardware.Count) + { + SashGroupList.ElementAt(i).SetSelFamilyHardwareFromIndex(prevHardware.FirstOrDefault()!.Id); + } + else if(SashGroupList.ElementAt(i).nSashQty == prevHardware.ElementAt(i).SashQty) + { + SashGroupList.ElementAt(i).SetSelFamilyHardwareFromIndex(prevHardware.ElementAt(i).Id); + } } else if (prevHardware != null && (!string.IsNullOrEmpty(SashGroupList.ElementAt(i).SelFamilyHardware) || SashGroupList.ElementAt(i).SelHardware != null || SashGroupList.ElementAt(i).SelHardware.Id != "000000")) diff --git a/WebWindowComplex/WebWindowComplex.csproj b/WebWindowComplex/WebWindowComplex.csproj index 05513ec..7f3d76e 100644 --- a/WebWindowComplex/WebWindowComplex.csproj +++ b/WebWindowComplex/WebWindowComplex.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 3.1.4.2316 + 3.1.4.2910 Annamaria Sassi Egalware Componente gestione Configurazioni avanzate Window per LUX @@ -166,6 +166,22 @@ + + + + + + + + + + + + + + + + diff --git a/WebWindowConfigurator/WebWindowConfigurator.csproj b/WebWindowConfigurator/WebWindowConfigurator.csproj index 6f0e597..41db710 100644 --- a/WebWindowConfigurator/WebWindowConfigurator.csproj +++ b/WebWindowConfigurator/WebWindowConfigurator.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 3.1.4.2316 + 3.1.4.2910 Annamaria Sassi Egalware Componente gestione JWD per LUX @@ -284,6 +284,9 @@ + + +