Gestione jwd vuoto

This commit is contained in:
Annamaria Sassi
2026-02-03 16:15:58 +01:00
parent 5d5ee71bb5
commit cb98adaa11
3 changed files with 54 additions and 46 deletions
+50 -44
View File
@@ -642,37 +642,40 @@ namespace WebWindowComplex
UpdateDict();
}
}
checkWarnings();
if (SashList.Count > 0)
if (m_CurrWindow.AreaList != null && m_CurrWindow.AreaList.Count > 0)
{
currAntaIndex = 0;
}
if (updRequested)
{
// se mancasse dizionario forme chiamo quello
if (LiveData.DictShape.Count == 0 && listErrLink.Count == 0)
checkWarnings();
if (SashList.Count > 0)
{
if (firstDisplay && isRendered)
{
firstDisplay = false;
// preview SVG senza HW
await DoPreviewSvg(true, true);
}
List<int> reqList = SashList.Select(x => x.GroupId).ToList();
if (reqList.Count > 0)
{
await DoReqShape(reqList);
}
currAntaIndex = 0;
}
else
if (updRequested)
{
// chiedo SVG
if (prevReq != (int)DataReq.ReqSvg || !prevLiveData.JwdEqual(LiveData.CurrJwd))
// se mancasse dizionario forme chiamo quello
if (LiveData.DictShape.Count == 0 && listErrLink.Count == 0)
{
if (prevReq != (int)DataReq.ReqHwOpt)
await DoPreviewSvg(true);
else if (LiveData.DictOptionsXml.Count > 0)
await DoPreviewSvg(true);
if (firstDisplay && isRendered)
{
firstDisplay = false;
// preview SVG senza HW
await DoPreviewSvg(true, true);
}
List<int> reqList = SashList.Select(x => x.GroupId).ToList();
if (reqList.Count > 0)
{
await DoReqShape(reqList);
}
}
else
{
// chiedo SVG
if (prevReq != (int)DataReq.ReqSvg || !prevLiveData.JwdEqual(LiveData.CurrJwd))
{
if (prevReq != (int)DataReq.ReqHwOpt)
await DoPreviewSvg(true);
else if (LiveData.DictOptionsXml.Count > 0)
await DoPreviewSvg(true);
}
}
}
}
@@ -696,31 +699,34 @@ namespace WebWindowComplex
m_CurrWindow = null;
}
m_CurrWindow = WindowFromJson.Deserialize();
FrameWindow = m_CurrWindow.AreaList[0];
if (m_PreviousWindow != null)
if(m_CurrWindow.AreaList != null && m_CurrWindow.AreaList.Count > 0)
{
for (int i = 0; i < 2; i++)
m_CurrWindow.AreaList.First().DimensionList[i].dDimension = m_PreviousWindow.AreaList.First().DimensionList[i].dDimension;
if (m_CurrWindow.AreaList.First().Shape == Shapes.TRIANGLE)
FrameWindow = m_CurrWindow.AreaList[0];
if (m_PreviousWindow != null)
{
for (int i = 0; i < 2; i++)
m_CurrWindow.AreaList.First().JointList[i].SetSelJointType(m_PreviousWindow.AreaList.First().JointList[i].SelJointType);
m_CurrWindow.AreaList.First().DimensionList[i].dDimension = m_PreviousWindow.AreaList.First().DimensionList[i].dDimension;
if (m_CurrWindow.AreaList.First().Shape == Shapes.TRIANGLE)
{
for (int i = 0; i < 2; i++)
m_CurrWindow.AreaList.First().JointList[i].SetSelJointType(m_PreviousWindow.AreaList.First().JointList[i].SelJointType);
}
else
{
for (int i = 0; i < 4; i++)
m_CurrWindow.AreaList.First().JointList[i].SetSelJointType(m_PreviousWindow.AreaList.First().JointList[i].SelJointType);
}
}
else
if (m_CurrWindow != null)
{
for (int i = 0; i < 4; i++)
m_CurrWindow.AreaList.First().JointList[i].SetSelJointType(m_PreviousWindow.AreaList.First().JointList[i].SelJointType);
// Aggiornamento liste sash, split, splitted, fill e itemTable
UpdateLists();
}
if (SashList.Count > 0)
currAntaIndex = 0;
// Aggiorno window con dati shape e hw option
UpdateDict();
}
if (m_CurrWindow != null)
{
// Aggiornamento liste sash, split, splitted, fill e itemTable
UpdateLists();
}
if (SashList.Count > 0)
currAntaIndex = 0;
// Aggiorno window con dati shape e hw option
UpdateDict();
}
/// <summary>