- Gestito salvataggio e chiusura componente con salvataggio jwd

- Correzioni valori nulli
- Aggiunta funzione per calcolare altezza sashGroup
This commit is contained in:
Annamaria Sassi
2026-03-03 19:02:42 +01:00
parent 224bac0947
commit ada0fc2ce5
18 changed files with 319 additions and 299 deletions
+13 -6
View File
@@ -322,7 +322,7 @@ namespace WebWindowComplex.Models
double dim = dDimension;
if (!(MeasureType.Equals(MeasureTypes.ABSOLUTE)))
{
double width = Parent.CalculateWidthArea(frame, frame.AvailWidthArea());
double width = Parent.CalculateWidthSashGroup(frame, frame.AvailWidthArea(), new AreaFound(-1, false)).m_Dimension;
dim = ConvertDimension(dimList, MeasureType, MeasureTypes.ABSOLUTE, width, -1);
}
if (item.AreaList.First() is Split s)
@@ -414,7 +414,7 @@ namespace WebWindowComplex.Models
Frame? frame = m_Parent.ParentWindow.AreaList.FirstOrDefault();
if (frame != null)
{
double widthTot = Parent.CalculateWidthSashGroup(frame!, frame!.DimensionList.Where(x => x.sName == "Width").First().dDimension, new AreaFound(-1, false)).m_Dimension;
double widthTot = Parent.CalculateWidthSashGroup(frame!, frame!.AvailWidthArea(), new AreaFound(-1, false)).m_Dimension;
if (Parent.bIsDimensionLight)
{
for (int i = 0; i < m_Parent.SashList.Count; i++)
@@ -430,13 +430,20 @@ namespace WebWindowComplex.Models
+ m_Parent.SashList.ElementAt(i).ElementDimensionList.Last().dOverlap;
}
}
else
{
for (int i = 0; i < m_Parent.SashList.Count - 1; i++)
{
widthTot = widthTot + m_Parent.SashList.ElementAt(i).ElementDimensionList.ElementAt(1).dOverlap;
}
}
AreaDimension ad = new AreaDimension(m_dDimension, SelMeasureType, Parent);
List<AreaDimension> adList = new List<AreaDimension>();
List<AreaDimension> newDimensions = new List<AreaDimension>();
foreach (var it in m_Parent.SashList)
{
adList.Add(new AreaDimension(it.m_dDimension, it.SelMeasureType, it.Parent));
newDimensions.Add(new AreaDimension(it.m_dDimension, it.SelMeasureType, it.Parent));
}
double overlap = 0;
//double overlap = 0;
//if (!Parent.bIsDimensionLight)
//{
// int index = m_Parent.SashList.IndexOf(this);
@@ -445,7 +452,7 @@ namespace WebWindowComplex.Models
// else
// overlap = m_Parent.SashList.ElementAt(index).ElementDimensionList.Last().dOverlap;
//}
m_dDimension = ad.ConvertDimension(adList, SelMeasureType, newType, widthTot, nSashId - 1);
m_dDimension = ad.ConvertDimension(newDimensions, SelMeasureType, newType, widthTot, nSashId - 1);
SelMeasureType = (MeasureTypes)value;
}
}